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
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.
Posted Oct 30, 2024 10:48 UTC (Wed)
by gaoqiang (guest, #173011)
[Link]
1½ Topics: realtime throttling and user-space adaptive spinning