VOOZH about

URL: https://www.phoronix.com/news/Linux-sched-ext-SCX-ENQ-IMMED

⇱ Linux 7.1 sched_ext To Add "SCX_ENQ_IMMED" For Tighter Control When Tasks Land On A CPU - Phoronix


👁 Phoronix

Linux 7.1 sched_ext To Add "SCX_ENQ_IMMED" For Tighter Control When Tasks Land On A CPU

Written by Michael Larabel in Linux Kernel on 16 March 2026 at 02:41 PM EDT. 1 Comment
The Linux kernel's extensible scheduler class "sched_ext" to allow for custom CPU scheduling policies as BPF programs continues enabling new functionality. Queued up in the sched_ext development code ahead of next month's Linux 7.1 cycle is the new SCX_ENQ_IMMED capability for enabling tighter control over when tasks land on a CPU.

The new SCX_ENQ_IMMED flag for sched_ext controls task enqueue behavior by ensuring that a task is enqueued to a local Dispatch Queue (DSQ) if it's able to start running immediately. In other words, if it can be executed immediately.

Longtime Linux developer Tejun Heo worked on this SCX_ENQ_IMMED flag for sched_ext and explained in the patch:
"Add SCX_ENQ_IMMED enqueue flag for local DSQ insertions. Once a task is dispatched with IMMED, it either gets on the CPU immediately and stays on it, or gets reenqueued back to the BPF scheduler. It will never linger on a local DSQ behind other tasks or on a CPU taken by a higher-priority class.
...
This enables tighter scheduling latency control by preventing tasks from piling up on local DSQs. It also enables opportunistic CPU sharing across sub-schedulers - without this, a sub-scheduler can stuff the local DSQ of a shared CPU, making it difficult for others to use."

With the patch now part of sched_ext's "for-7.1" Git branch, you can expect to see SCX_ENQ_IMMED submitted as part of next month's Linux 7.1 merge window.

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.