Linux's Preempt Lazy Support Coming To POWER CPUs
([Linux Kernel] 80 Minutes Ago
Preempt Lazy For PowerPC)
- Reference: 0001515065
- News link: https://www.phoronix.com/news/Linux-6.14-Preempt-Lazy-POWER
- Source link:
Linux 6.13 is introducing [1]a new Lazy Preemption mode with the "PREEMPT_LAZY" option. The lazy preemption mode is similar to full preemption but is less eager to preempt normal (SCHED_NORMAL) tasks. The goal is on reducing lock holder preemption and obtaining some of the performance gains found under the voluntary preemption mode. [2]For Linux 6.13 the lazy preemption mode was exposed for x86/x86_64, RISC-V, and [3]later added for LoongArch . Likely with the upcoming Linux 6.14, lazy preempt should work on POWER platforms.
There is [4]a patch queued up by an IBM engineer for adding preempt lazy support to PowerPC hardware. That patch from Shrikanth Hegde explains:
powerpc: Add preempt lazy support
Define preempt lazy bit for Powerpc. Use bit 9 which is free and within 16 bit range of NEED_RESCHED, so compiler can issue single andi.
Since Powerpc doesn't use the generic entry/exit, add lazy check at exit to user. CONFIG_PREEMPTION is defined for lazy/full/rt so use it for return to kernel.
Ran a few benchmarks and db workload on Power10. Performance is close to preempt=none/voluntary.
Since Powerpc systems can have large core count and large memory, preempt lazy is going to be helpful in avoiding soft lockup issues.
That patch has made it to PowerPC.git's "next-test" branch -- one step away from the "next" branch.
Given the better part of a month to go until the Linux 6.14 merge window kicks off, it's looking more than likely that this lazy preemption for IBM POWER / OpenPOWER processors will come with Linux 6.14.
[1] https://www.phoronix.com/news/Linux-6.13-Lazy-Preemption
[2] https://www.phoronix.com/news/Linux-6.13-Sched-Lazy-Preempt
[3] https://www.phoronix.com/news/Linux-6.13-LoongArch
[4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next-test&id=00199ed6f2ca6601b2c5856fac64132303d9437a
There is [4]a patch queued up by an IBM engineer for adding preempt lazy support to PowerPC hardware. That patch from Shrikanth Hegde explains:
powerpc: Add preempt lazy support
Define preempt lazy bit for Powerpc. Use bit 9 which is free and within 16 bit range of NEED_RESCHED, so compiler can issue single andi.
Since Powerpc doesn't use the generic entry/exit, add lazy check at exit to user. CONFIG_PREEMPTION is defined for lazy/full/rt so use it for return to kernel.
Ran a few benchmarks and db workload on Power10. Performance is close to preempt=none/voluntary.
Since Powerpc systems can have large core count and large memory, preempt lazy is going to be helpful in avoiding soft lockup issues.
That patch has made it to PowerPC.git's "next-test" branch -- one step away from the "next" branch.
Given the better part of a month to go until the Linux 6.14 merge window kicks off, it's looking more than likely that this lazy preemption for IBM POWER / OpenPOWER processors will come with Linux 6.14.
[1] https://www.phoronix.com/news/Linux-6.13-Lazy-Preemption
[2] https://www.phoronix.com/news/Linux-6.13-Sched-Lazy-Preempt
[3] https://www.phoronix.com/news/Linux-6.13-LoongArch
[4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next-test&id=00199ed6f2ca6601b2c5856fac64132303d9437a
phoronix