The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/5] sched: dynamic: Simplify PREEMPT_DYNAMIC
@ 2026-07-03 13:33 Mark Rutland
  2026-07-03 13:33 ` [PATCH 1/5] sched: dynamic: Make PREEMPT_DYNAMIC depend on ARCH_HAS_PREEMPT_LAZY Mark Rutland
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Mark Rutland @ 2026-07-03 13:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: frederic, jstultz, juri.lelli, mark.rutland, mingo, peterz, tglx,
	vincent.guittot, vschneid

All architectures which currently suppoort PREEMPT_DYNAMIC select
ARCH_HAS_PREEMPT_LAZY.  On architectures which select
ARCH_HAS_PREEMPT_LAZY, it has not been possible to select the NONE and
VOLUNTARY preemption models since v7.0 due to commit:

  7dadeaa6e851 ("sched: Further restrict the preemption modes")

Hence in practice PREEMPT_DYNAMIC no longer supports the NONE or
VOLUNTARY preemption models.

This series makes the de-facto situation official by making
PREEMPT_DYNAMIC depend on ARCH_HAS_PREEMPT_LAZY, and removing all the
redundant code.

For x86_64 v7.2-rc1 defconfig built with GCC 10.2.1, this makes the
bzImage 28K smaller, mostly due to removing NOPs that will never be
patched to {cond,might}_resched() at runtime:

  [mark@lakrids:~/src/linux]% ls -al vmlinux-*
  -rwxr-xr-x 1 mark mark 53844952 Jul  3 14:09 vmlinux-after
  -rwxr-xr-x 1 mark mark 53842856 Jul  3 14:09 vmlinux-before
  [mark@lakrids:~/src/linux]% ls -al bzImage-*
  -rw-r--r-- 1 mark mark 14771200 Jul  3 14:09 bzImage-after
  -rw-r--r-- 1 mark mark 14799872 Jul  3 14:08 bzImage-before

Mark.

Mark Rutland (5):
  sched: dynamic: Make PREEMPT_DYNAMIC depend on ARCH_HAS_PREEMPT_LAZY
  sched: dynamic: Simplify {cond,might}_resched()
  sched: dynamic: Simplify preempt_schedule{,_notrace}()
  sched: dynamic: Simplify irqentry_exit_cond_resched()
  sched: dynamic: Remove HAVE_PREEMPT_DYNAMIC_{CALL,KEY}

 arch/Kconfig                       |  38 -------
 arch/arm64/Kconfig                 |   1 -
 arch/arm64/include/asm/preempt.h   |  10 --
 arch/loongarch/Kconfig             |   1 -
 arch/powerpc/Kconfig               |   1 -
 arch/powerpc/include/asm/preempt.h |   7 --
 arch/riscv/Kconfig                 |   1 -
 arch/s390/Kconfig                  |   1 -
 arch/s390/include/asm/preempt.h    |  11 --
 arch/x86/Kconfig                   |   1 -
 arch/x86/include/asm/preempt.h     |  28 -----
 include/asm-generic/preempt.h      |  10 --
 include/linux/irq-entry-common.h   |  17 +--
 include/linux/kernel.h             |  20 ----
 include/linux/sched.h              |  31 +----
 kernel/Kconfig.preempt             |   9 +-
 kernel/entry/common.c              |  17 +--
 kernel/sched/core.c                | 176 +----------------------------
 18 files changed, 13 insertions(+), 367 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-07-06  5:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 13:33 [PATCH 0/5] sched: dynamic: Simplify PREEMPT_DYNAMIC Mark Rutland
2026-07-03 13:33 ` [PATCH 1/5] sched: dynamic: Make PREEMPT_DYNAMIC depend on ARCH_HAS_PREEMPT_LAZY Mark Rutland
2026-07-06  4:36   ` Shrikanth Hegde
2026-07-03 13:33 ` [PATCH 2/5] sched: dynamic: Simplify {cond,might}_resched() Mark Rutland
2026-07-06  4:59   ` Shrikanth Hegde
2026-07-03 13:33 ` [PATCH 3/5] sched: dynamic: Simplify preempt_schedule{,_notrace}() Mark Rutland
2026-07-06  5:19   ` Shrikanth Hegde
2026-07-03 13:33 ` [PATCH 4/5] sched: dynamic: Simplify irqentry_exit_cond_resched() Mark Rutland
2026-07-06  4:42   ` Shrikanth Hegde
2026-07-03 13:33 ` [PATCH 5/5] sched: dynamic: Remove HAVE_PREEMPT_DYNAMIC_{CALL,KEY} Mark Rutland
2026-07-06  4:30 ` [PATCH 0/5] sched: dynamic: Simplify PREEMPT_DYNAMIC Shrikanth Hegde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox