Skip to content

sched: dynamic: Simplify PREEMPT_DYNAMIC

Mark Rutland lkml 2 versions – Applied

Status from this message: The following commit has been merged into the sched/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 13 repliesApplied
  2. v15 patches 14 repliesSuperseded

Changes in v2 from the cover letter

* Rebase to v7.2-rc4
* Apply Revied-by tags.
* Fix typos in commit messages.
* Add patch to cleanup accessors (per Shrikanth's comment)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6sched: dynamic: Make PREEMPT_DYNAMIC depend on ARCH_HAS_PREEMPT_LAZYkernel/Kconfig.preempt kernel/sched/core.c+4 -600 replies
2/6sched: dynamic: Simplify {cond,might}_resched()include/linux/kernel.h include/linux/sched.h kernel/sched/core.c+4 -911 reply
3/6sched: dynamic: Simplify preempt_schedule{,_notrace}()arch/arm64/include/asm/preempt.h arch/s390/include/asm/preempt.h arch/x86/include/asm/preempt.h +2 more+0 -1111 reply
4/6sched: dynamic: Simplify irqentry_exit_cond_resched()include/linux/irq-entry-common.h kernel/entry/common.c kernel/sched/core.c+3 -381 reply
5/6sched: dynamic: Remove HAVE_PREEMPT_DYNAMIC_{CALL,KEY}arch/Kconfig arch/arm64/Kconfig arch/loongarch/Kconfig +6 more+2 -602 replies
6/6sched: dynamic: Simplify preempt model accessorsinclude/linux/preempt.h kernel/sched/core.c+10 -142 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchShrikanth HegdeJinjie RuanMete Durlu
SeriesR-b T-b T-b T-b
1/6R-b R-b
2/6R-b R-b
3/6R-b R-b
4/6R-b R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/6] sched: dynamic: Simplify PREEMPT_DYNAMIC

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 redundant code.

Since v1, I've had to rebase atop v7.2-rc4 to avoid a conflict with commit:

a2c02aa0c6ca ("powerpc: Remove dead non-preemption code")

Given this is now late in the cycle, and given the tip:sched/core branch is based on v7.2-rc1, I suspect tip folk might not want to queue this now. Please let me know what you'd prefer; I'm happy to rebase and resend after v7.3-rc1.

Since v1:
* Rebase to v7.2-rc4
* Apply Revied-by tags.
* Fix typos in commit messages.
* Add patch to cleanup accessors (per Shrikanth's comment)

Mark.

Mark Rutland (6):
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}
sched: dynamic: Simplify preempt model accessors

 arch/Kconfig                     |  38 -------
 arch/arm64/Kconfig               |   1 -
 arch/arm64/include/asm/preempt.h |  10 --
 arch/loongarch/Kconfig           |   1 -
 arch/powerpc/Kconfig             |   1 -
 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/preempt.h          |  20 ++--
 include/linux/sched.h            |  31 +-----
 kernel/Kconfig.preempt           |   9 +-
 kernel/entry/common.c            |  17 +--
 kernel/sched/core.c              | 180 +------------------------------
 18 files changed, 23 insertions(+), 374 deletions(-)
Signature · 1 line
2.30.2