Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well that seems like an unreasonable expectation no? Also isn't the point of spinlocks that they get released before the kernel does anything? Otherwise you could just use a futex... Which maybe you should do anyway...

https://matklad.github.io/2020/01/04/mutexes-are-faster-than...

 help



The scheduling is based on how much the LWP made use of its previous time slices. A spinning program clearly is using every cycle it's given without yielding, and so you can clearly tell preemption should be minimized.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: