|
|
Subscribe / Log in / New account

1½ Topics: realtime throttling and user-space adaptive spinning

1½ Topics: realtime throttling and user-space adaptive spinning

Posted Jun 1, 2023 11:07 UTC (Thu) by zse (guest, #120483)
Parent article: 1½ Topics: realtime throttling and user-space adaptive spinning

IMHO adaptive spinning does not seem to be worth it.

From my understanding, simply always spinning for a short duration before making the waiting syscall should be cheap enough (assuming a good short duration is chosen) when using appropriate pause instructions. Adaptive spinning would also have to have a spin limit (as there is still no guarantee that the waited-on thread continues to run after the check or is otherwise giving up the lock anytime soon), so only on very specific situations this would possibly give a tiny advantage, while also introducing significant book-keeping overhead. Just my 2 cents.


to post comments

1½ Topics: realtime throttling and user-space adaptive spinning

Posted Oct 30, 2024 10:48 UTC (Wed) by gaoqiang (guest, #173011) [Link]

I think If the critical section is short enough(maybe ns level), adaptive spinning may be more useful.


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