Lazy Preemption Merged Along With Other Scheduler Improvements For Linux 6.13
- Reference: 0001506952
- News link: https://www.phoronix.com/news/Linux-6.13-Sched-Lazy-Preempt
- Source link:
As noted a few weeks back [1]lazy preemption "PREEMPT_LAZY" was tracking for introduction in the Linux 6.13 cycle. Lazy preemption is described in the scheduler pull request as:
Add the "Lazy preemption" model (CONFIG_PREEMPT_LAZY=y), which optimizes fair-class preemption by delaying preemption requests to the tick boundary, while working as full preemption for RR/FIFO/DEADLINE classes.
Or the Kconfig description for CONFIG_PREEMPT_LAZY that sums it up a bit more elegantly:
This option provides a scheduler driven preemption model that is fundamentally similar to full preemption, but is less eager to preempt SCHED_NORMAL tasks in an attempt to reduce lock holder preemption and recover some of the performance gains seen from using Voluntary preemption.
This lazy preemption option is currently working on x86_64 and RISC-V systems.
The Linux 6.13 scheduler code also now ensures idle tasks are only initialized once, a fair scheduler optimization, optimizing the generic idle loop by dropping an unnecessary memory barrier, [2]improving cache locality for Restartable Sequences (RSEQ), and [3]prep changes for Proxy Execution .
The lazy preemption code plus other scheduler changes make for a pretty exciting pull for Linux 6.13. The full list of scheduler patches for those interested via the [4]Linux kernel mailing list .
[1] https://www.phoronix.com/news/Linux-6.13-Lazy-Preemption
[2] https://www.phoronix.com/news/RSEQ-Cache-Local-Speedup
[3] https://www.phoronix.com/news/Linux-6.13-Prep-For-Proxy-Exec
[4] https://lore.kernel.org/lkml/Zzt_or2E2KEypfbi@gmail.com/
mrg666