3 ms·
> If you are spending even a tiny fraction of 1% of your time spinning, your app has terrible performance bugs already. Not necessarily. Very latency-sensitive
by the8472 8y ago
> If you are spending even a tiny fraction of 1% of your time spinning, your app has terrible performance bugs already.
Not necessarily. Very latency-sensitive applications may pin a thread to a CPU core and mark the core as reserved so the kernel doesn't schedule any other task or interrupt on it. Busy-waiting is used instead of yielding to the scheduler, that way context switches can be avoided almost entirely.
- ajross 8y agoI guess. Normal RTOS applications with needs like that just do the work in an ISR. But sure, granted. Those aren't applications that are going to be running on Skylake though. The bottom line is that this is an architecture optimized for compute throughput, and they figured out that if they spent a few cycles on spin exit they could more than make it back via more effective hyperthread dispatch. And for everyone but .NET, that seems to be the case.
- cjhanks 8y agoWhy would latency sensitive applications (let's say a millisecond of jitter) be using .NET and its runtime? I thought the VM class of languages were generally inappropriate for real-time work. Heck, even in C, you need to do specific work on the memory allocator to make real-time viable.