Lazy Preemption Merged Along With Other Scheduler Improvements For Linux 6.13

Written by Michael Larabel in Linux Kernel on 19 November 2024 at 08:43 PM EST. 21 Comments
LINUX KERNEL
All of the scheduler feature changes were merged today for the Linux 6.13 kernel, including the introduction of the lazy preemption model.

As noted a few weeks back 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.

Lazy Tux


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, improving cache locality for Restartable Sequences (RSEQ), and 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 Linux kernel mailing list.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week