|
|
Log in / Subscribe / Register

Delays and puns

Delays and puns

Posted Jul 28, 2026 13:49 UTC (Tue) by daroc (editor, #160859)
In reply to: Delays and puns by johill
Parent article: Hazard pointers for the kernel

It's four per CPU; so on modern systems you can probably safely assume at least eight. That said, all that happens if you overflow the per-CPU slots is that they go on the linked list and cause a slight performance penalty. Whether that penalty is worse than contention on your mutexes is the kind of performance question that I think should probably be solved via measurement, and not via too much ungrounded speculation.

At a guess, though, I would expect contention on a mutex, which involves suspending tasks and performing context switches, to be much more expensive than scanning the hazard pointer list, at least until you get up to hundreds of concurrent entries.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds