Dynamic Preemption Support Sent In For The Linux 5.12 Kernel
The CONFIG_PREEMPT_DYNAMIC option when enabled allows setting preempt= at boot time to either none/voluntary/full with full preemption being the default. Distributions can still set the standard PREEMPT controls but this dynamic option allows changing it at boot time without rebuilding the kernel or even at run-time via a DebugFS interface. The kernel relies on runtime patching for changing the kernel preemption mode on the fly.
The PREEMPT_DYNAMIC Kconfig help text explains:
This option allows to define the preemption model on the kernel command line parameter and thus override the default preemption model defined during compile time.
The feature is primarily interesting for Linux distributions which provide a pre-built kernel binary to reduce the number of kernel flavors they offer while still offering different usecases. The runtime overhead is negligible with HAVE_STATIC_CALL_INLINE enabled but if runtime patching is not available for the specific architecture then the potential overhead should be considered.
Interesting if you want the same pre-built kernel should be used for both Server and Desktop workloads.
In addition to the dynamic preemption handling, the scheduler update also has improvements around SMP/NUMA load balancing. In particular, scanning for an idle sibling is now done in a single pass with better logic than prior kernels.
This pull also has improved the CPUFreq cooling driver by getting the effective CPU utilization metrics from the scheduler, improved the fair scheduler's active load balancing logic, and other improvements.
See this pull request for details. I'll be running some benchmarks on the Linux 5.12 Git state in the coming days.