https://devblogs.microsoft.com/oldnewthing/20250924-00/?p=111624 Skip to main content [RE1Mu3b] Microsoft Dev Blogs Dev Blogs Dev Blogs * Home * Developer + Microsoft for Developers + Visual Studio + Visual Studio Code + Develop from the cloud + All things Azure + Xcode + DevOps + Windows Developer + Developer support + ISE Developer + Engineering@Microsoft + Azure SDK + Command Line + Perf and Diagnostics + React Native * Technology + AutoGen + DirectX + OpenAPI + Semantic Kernel + SurfaceDuo + Windows AI Platform * Languages + C++ + C# + F# + TypeScript + PowerShell Community + PowerShell Team + Python + JavaScript + Java + Java Blog in Chinese + Go * .NET + All .NET posts + .NET Aspire + .NET MAUI + AI + ASP.NET Core + Blazor + Entity Framework + NuGet + Servicing + .NET Blog in Chinese * Platform Development + #ifdef Windows + Azure AI Foundry + Azure Government + Azure VM Runtime Team + Bing Dev Center + Microsoft Edge Dev + Microsoft Azure + Microsoft 365 Developer + Microsoft Entra Identity Developer + Old New Thing + Power Platform + Windows MIDI and Music dev * Data Development + Azure Cosmos DB + Azure Data Studio + Azure SQL + OData + Revolutions R + SQL Server Data Tools + Unified Data Model (IDEAs) * More [ ] Search Search * No results Cancel * Dev Blogs * The Old New Thing * Why is Windows still tinkering with critical sections? September 24th, 2025 heartlike3 reactions Why is Windows still tinkering with critical sections? Raymond Chen Raymond Chen Show more Adrian aka Silent aka CookiePLMonster did a deep investigation into how a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2. One reaction I saw to this was "Why is Windows still tinkering with critical sections? Surely there aren't any bugs in it after all these years." While there may not be bugs in critical sections, there may still be performance issues. And since critical sections are so heavily used, small performance issues can add up to large ones. We saw some time ago that many synchronization objects were made unfair to avoid lock convoys. At around the same time, critical sections were optimized to reduce their memory footprint, particularly their cost to non-paged pool. Non-paged pool is an expensive resource since (as the name suggests) it cannot be paged out. On systems doing large-scale computing, even a small cost in non-paged pool is multiplied by a enormous number of critical sections, resulting in outsized non-paged pool pressure that creates performance and reliability problems. More recently, changes were made to critical sections to try to detect and mitigate priority inversions, and (what is significant in 24H2) those mitigations were optimized further by moving more of the work into user mode and avoiding some cases that previously entailed kernel mode transitions. The critical section may be an old dog, but it's still learning new tricks in order to keep pace with a computing environment that is bigger, faster, and more concurrent that it was three decades ago. 3 * * * * * * 9 3 * Facebook Share on Facebook * Share on X * LinkedIn Share on Linkedin Category Old New Thing Topics Code Share * * * Author Raymond Chen Raymond Chen Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information. 9 comments Join the discussion. Leave a commentCancel reply Sign in [ ] [Reply] [Cancel] Code of Conduct Sort by : Newest Newest Popular Oldest * [png] Khoa Vo 8 hours ago 0 Collapse this comment Copy link So you want everyone in the world to stop getting updates so that janky old video games could run? Log in to Vote or Reply + [png] Igor Levicki 5 hours ago * Edited 0 Collapse this comment Copy link First, what difference does it make whether it is "janky old video games" (Saints Row IV was released in 2013 so not even that old), or some other software that depends on like 3 decades of established behavior of critical sections? Second, no I don't mind others getting updates as long as I have a choice. This kind of potentially breaking behavior change should be opt-in. As in, there should be a new manfest entry saying "I am OK with new critical section behavior" which developers add to new executables going forward, not something that retroactively applies to every executable ever compiled... Read more First, what difference does it make whether it is "janky old video games" (Saints Row IV was released in 2013 so not even that old), or some other software that depends on like 3 decades of established behavior of critical sections? Second, no I don't mind others getting updates as long as I have a choice. This kind of potentially breaking behavior change should be opt-in. As in, there should be a new manfest entry saying "I am OK with new critical section behavior" which developers add to new executables going forward, not something that retroactively applies to every executable ever compiled in the last 3 decades. Or if the the behavior is global and can't be enabled / disabled per process, then add a settings option "Optimize Windows for : [o] Performance [ ] Compatibility" whose change would result in enabling / disabling of changes like this after reboot. That way people can still use old software if they want to, and modern software can eke out all performance out of hardware. At this point, Windows' only strength is backward compatibility -- everything else starting with disjointed UI, security updates that break more things than they fix, blatant collection and monetization of personal data, aggressive advertising, all the way to eco-unfriendly forced deprecation of still capable hardware is a weakness. So if you remove backward compatibility, what's left as a reason to use it? Absolutely nothing, that's what. Read less Log in to Vote or Reply o [png] Raymond ChenMicrosoft employee Author 2 hours ago 0 Collapse this comment Copy link Just calling "Should I do things the new way?" function will consume additional stack and create the problem it was trying to avoid. If you say that the contents of uninitialized data is contractual behavior, then not only can no code ever change, you can never upgrade the compiler either. (Because changes to the compiler may change register allocation or inlining decisions.) o [png] Xu En Jia 2 hours ago * Edited 0 Collapse this comment Copy link This kind of potentially breaking behavior change should be opt-in. Following your logic, almost every change in Windows would have to be listed in this manifest entry, because even a minor change, such as the API using an additional 8 bytes of stack space, could potentially cause a crash in programs that rely on uninitialized stack garbage have valid values Or if the the behavior is global and can't be enabled / disabled per process, then add a settings option "Optimize Windows for : [o] Performance [ ] Compatibility" whose change would result in enabling / disabling of changes like this after... Read more This kind of potentially breaking behavior change should be opt-in. Following your logic, almost every change in Windows would have to be listed in this manifest entry, because even a minor change, such as the API using an additional 8 bytes of stack space, could potentially cause a crash in programs that rely on uninitialized stack garbage have valid values Or if the the behavior is global and can't be enabled / disabled per process, then add a settings option "Optimize Windows for : [o] Performance [ ] Compatibility" whose change would result in enabling / disabling of changes like this after reboot. That way people can still use old software if they want to, and modern software can eke out all performance out of hardware. There's a thing called a virtual machine. Read less * [png] Igor Levicki 1 day ago 0 Collapse this comment Copy link @Raymond Chen You should tell your colleagues that they either stop jerking around with critical sections or start testing legacy software and games to make sure they still work after those changes. And I was wondering why Saints Row IV (specifically sriv_legacy branch on Steam) which I never had problems playing on this machine has become unplayable (it keeps hanging at random intervals with Windows popping its [End Program] [Cancel] message) unless I set the process affinity to only 2 out of 12 cores. Too bad we users don't have a clear way of knowing about and opting out of such changes. And... Read more @Raymond Chen You should tell your colleagues that they either stop jerking around with critical sections or start testing legacy software and games to make sure they still work after those changes. And I was wondering why Saints Row IV (specifically sriv_legacy branch on Steam) which I never had problems playing on this machine has become unplayable (it keeps hanging at random intervals with Windows popping its [End Program] [Cancel] message) unless I set the process affinity to only 2 out of 12 cores. Too bad we users don't have a clear way of knowing about and opting out of such changes. And yes, I am aware that probably the game code is to blame but it worked before and being out of support window there's nobody who can fix it now that Microsoft has broken it. Read less Log in to Vote or Reply + [png] IS4 11 hours ago 0 Collapse this comment Copy link Well the situation has arguably changed quite a lot over the past 30 years. There is so many software now that you can't plausibly test everything. This bug affects only older versions of classic GTA San Andreas (an edition that is not sold anymore - thanks R*), which is still miraculously relevant only because it's the only version the multiplayer mod is compatible with. Log in to Vote or Reply o [png] Danielix Klimax September 27, 2025 0 Collapse this comment Copy link @Igor Levicki Your ideas are very unusual, to say the least. Thankfully, you are not in charge of Windows and nobody relevant listens to you otherwise you'd force total freeze of any development of everything. Total stasis. And your claim about Linux and Proton is very hilarious (and from alternate universe)... o [png] Igor Levicki 5 hours ago 0 Collapse this comment Copy link If they can't test, then they shouldn't change what works. It's as simple as that. But nowadays it's all the rage to push untested changes into production and wait for complaints. And if not enough people complains? Success. Critical threshold for "won't fix" to be determined by a dice roll. If this continues, the best way of playing PC games will be on Linux using Proton -- at least that's not going to break randomly because of an update. As far as I am concerned Microsoft's arrogant attitude of "we know best what you need" has long outstayed its welcome. * [png] IS4 2 days ago 0 Collapse this comment Copy link Wow, I got some reports of this bug from people on my SA-MP server and I would have never believed this was the cause! Log in to Vote or Reply Read next September 19, 2025 Learning to read C++ compiler errors: Not a legal base class Raymond Chen Raymond Chen September 18, 2025 Can I close a duplicate handle while I'm waiting on the original? Raymond Chen Raymond Chen Stay informed Get notified when new posts are published. [ ] Subscribe By subscribing you agree to our Terms of Use and Privacy Follow this blog youtube Are you sure you wish to delete this comment? OK Cancel Sign in Theme Insert/edit link Close Enter the destination URL URL [ ] Link Text [ ] [ ] Open link in a new tab Or link to existing content Search [ ] No search term specified. Showing recent items. Search or use up and down arrow keys to select an item. Cancel [Add Link] Code Block x Paste your code snippet [ ] Ok Cancel What's new * Surface Pro * Surface Laptop * Surface Laptop Studio 2 * Copilot for organizations * Copilot for personal use * AI in Windows * Explore Microsoft products * Windows 11 apps Microsoft Store * Account profile * Download Center * Microsoft Store support * Returns * Order tracking * Certified Refurbished * Microsoft Store Promise * Flexible Payments Education * Microsoft in education * Devices for education * Microsoft Teams for Education * Microsoft 365 Education * How to buy for your school * Educator training and development * Deals for students and parents * AI for education Business * Microsoft Cloud * Microsoft Security * Dynamics 365 * Microsoft 365 * Microsoft Power Platform * Microsoft Teams * Microsoft 365 Copilot * Small Business Developer & IT * Azure * Microsoft Developer * Microsoft Learn * Support for AI marketplace apps * Microsoft Tech Community * Azure Marketplace * AppSource * Visual Studio Company * Careers * About Microsoft * Company news * Privacy at Microsoft * Investors * Diversity and inclusion * Accessibility * Sustainability Your Privacy Choices Your Privacy Choices Consumer Health Privacy * Sitemap * Contact Microsoft * Privacy * Manage cookies * Terms of use * Trademarks * Safety & eco * Recycling * About our ads * (c) Microsoft 2025