| ▲ | mgaunard 11 hours ago | |||||||
Most people looking for performance will reach for the spinlock. The expectation is that the kernel should somehow detect applications that are spinning, and avoid preempting them early. | ||||||||
| ▲ | silon42 26 minutes ago | parent | next [-] | |||||||
If you are spinning so long that it requires preemption, you're doing something wrong, no? | ||||||||
| ||||||||
| ▲ | IshKebab 11 hours ago | parent | prev [-] | |||||||
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... | ||||||||