By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: New Patches Work To Optimize Code Generation For Linux Context Switching
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > New Patches Work To Optimize Code Generation For Linux Context Switching
Computing

New Patches Work To Optimize Code Generation For Linux Context Switching

News Room
Last updated: 2025/11/28 at 2:20 PM
News Room Published 28 November 2025
Share
New Patches Work To Optimize Code Generation For Linux Context Switching
SHARE

Cyber Week 2025: If you wish to enjoy the site ad-free, multi-page articles on a single page, and other benefits, consider joining Phoronix Premium. This week only is our Cyber Week promotion to help support all of our Linux/open-source hardware and software operations while enjoying the added premium benefits at a discounted rate. Thanks for your consideration and support this holiday season with providing daily original content for over 21 years.

As some additional enticing Linux kernel patches posted this week for review, an updated patch series is working to optimize code generation during context switching.

Xie Yuanbin pposted the set of three patches working to optimize the compiler’s code generation during context switching, which given its frequency can be an expensive task especially with the ever-increasing number of CPU security mitigations often making context switching even more costly.

Xie explained on the latest patch series:

“The purpose of this series of patches is to optimize the performance of context switching. It does not change the code logic, but only modifies the inline attributes of some functions.

It is found that finish_task_switch() is not inlined even in the O2 level optimization. This may affect performance for the following reasons:

1. It is in the context switching code, which is a hot code path.
2. Because of the modern CPU vulnerabilities, kernel is likely to perform some mitigations inside switch_mm_irq_off(), such as branch prediction hardening or l1d flushing, the instruction pipeline and cache may be flushed. finish_task_switch() is right after that, so the performance here is greatly affected by function calls and branch jumps.
3. The __schedule function has __sched attribute, which makes it be placed in the “.sched.text” section, while finish_task_switch() does not, which causes their distance to be very far in binary, aggravating the above performance degradation.

This series of patches primarily make some functions called in context switching as always inline to optimize performance.”

In ensuring more optimal code generation, time spent performing a context switch dropped by 11% on an Intel CPU or decreased by 44% when having Spectre V2 mitigations applied. Similarly, for an LLVM Clang built kernel the context switching time decreased by 8% or 35% when having Spectre V2 mitigations active.

Faster context switching

Promising data and those wanting to learn more or try out these patches can do so via this patch series.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Amazon Fire Stick users say device is ‘complete waste of money’ after big change Amazon Fire Stick users say device is ‘complete waste of money’ after big change
Next Article Black Friday deals slash the cost of smart rings by over 0 — the 5 incredible deals I’d shop at Amazon and Best Buy Black Friday deals slash the cost of smart rings by over $100 — the 5 incredible deals I’d shop at Amazon and Best Buy
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Score Up to 50% Off the Best Nintendo Switch and Switch 2 Games This Black Friday
Score Up to 50% Off the Best Nintendo Switch and Switch 2 Games This Black Friday
News
Upgrade Your Arsenal with These All-Clad Black Friday Deals
Upgrade Your Arsenal with These All-Clad Black Friday Deals
Gadget
Superyachts Add Spas and Yoga Decks to Meet Health-Focused Travel Trends
Superyachts Add Spas and Yoga Decks to Meet Health-Focused Travel Trends
Gadget
Best Black Friday deals on toys and games in 2025: Lego, Disney, and more
Best Black Friday deals on toys and games in 2025: Lego, Disney, and more
News

You Might also Like

Social media calendar: Top tools and templates for 2025
Computing

Social media calendar: Top tools and templates for 2025

31 Min Read
How To Get a First Name Domain for Less Than 1 | HackerNoon
Computing

How To Get a First Name Domain for Less Than $101 | HackerNoon

5 Min Read
Former Kraken exec Todd Humphrey launches firm to improve customer experiences in sports and beyond
Computing

Former Kraken exec Todd Humphrey launches firm to improve customer experiences in sports and beyond

8 Min Read
Is CereBree’s Vision Too Ambitious—Or Exactly What AI Needs? | HackerNoon
Computing

Is CereBree’s Vision Too Ambitious—Or Exactly What AI Needs? | HackerNoon

0 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?