Get the latest tech news

The long road to lazy preemption in the Linux CPU scheduler


[LWN subscriber-only content] Some review Current kernels have four different modes that regulate when one task can be preempted in favor of another. PREEMPT_NONE, the simplest mode, only allows preemption to happen when the running task has exhausted its time slice.

But a higher level of preemption can hurt the overall throughput of the system; workloads with a lot of long-running, CPU-intensive tasks tend to benefit from being disturbed as little as possible. There is also, of course, the need for extensive performance testing; Mike Galbraith has made an early start on that work, showing that throughput with lazy preemption falls just short of that with PREEMPT_VOLUNTARY. It all adds up to a lot to be done still, but the end result of the lazy-preemption work should be a kernel that is a bit smaller and simpler while delivering predictable latencies without the need to sprinkle scheduler-related calls throughout the code.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of long road

long road

Photo of lazy preemption

lazy preemption

Photo of Linux CPU

Linux CPU

Related news:

News photo

The long road to ropeless fishing

News photo

Global AI resolution is a step forward, but there is a long road ahead

News photo

Cruise Faces Long Road Back To City Streets in Wake of Safety Review