]> www.infradead.org Git - users/jedix/linux-maple.git/commit
powerpc: enable dynamic preemption
authorShrikanth Hegde <sshegde@linux.ibm.com>
Mon, 10 Feb 2025 18:43:34 +0000 (00:13 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 16 Apr 2025 17:00:22 +0000 (22:30 +0530)
commit6ad7751537e884c45b5340a4a24c25535f0d9c13
tree47f78f2c38487d65e69a0e2cc19180840c1a24c4
parent28affd477bf53ddd89b16e4dd7bacf64a1eaf116
powerpc: enable dynamic preemption

Once the lazy preemption is supported, it would be desirable to change
the preemption models at runtime. So add support for dynamic preemption
using DYNAMIC_KEY.

::Tested lightly on Power10 LPAR
Performance numbers indicate that, preempt=none(no dynamic) and
preempt=none(dynamic) are close.

cat /sys/kernel/debug/sched/preempt
(none) voluntary full lazy
perf stat -e probe:__cond_resched -a sleep 1
 Performance counter stats for 'system wide':
             1,253      probe:__cond_resched

echo full > /sys/kernel/debug/sched/preempt
cat /sys/kernel/debug/sched/preempt
none voluntary (full) lazy
perf stat -e probe:__cond_resched -a sleep 1
 Performance counter stats for 'system wide':
                 0      probe:__cond_resched

Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250210184334.567383-2-sshegde@linux.ibm.com
arch/powerpc/Kconfig
arch/powerpc/include/asm/preempt.h [new file with mode: 0644]
arch/powerpc/kernel/interrupt.c
arch/powerpc/lib/vmx-helper.c