Skip to content

RFC preempt: Tune preemption flavour on boot v3

Frederic Weisbecker lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7static_call/x86: Add __static_call_returnl0()arch/x86/include/asm/text-patching.h arch/x86/kernel/alternative.c arch/x86/kernel/static_call.c +2 more+57 -36 replies
2/7static_call: Pull some static_call declarations to the type headersinclude/linux/static_call.h include/linux/static_call_types.h+33 -300 replies
3/7preempt: Introduce CONFIG_PREEMPT_DYNAMICDocumentation/admin-guide/kernel-parameters.txt arch/Kconfig arch/x86/Kconfig +1 more+36 -00 replies
4/7preempt/dynamic: Provide cond_resched() and might_resched() static callsinclude/linux/kernel.h include/linux/sched.h kernel/sched/core.c+56 -93 replies
5/7preempt/dynamic: Provide preempt_schedule[_notrace]() static callsarch/x86/include/asm/preempt.h kernel/sched/core.c+38 -80 replies
6/7preempt/dynamic: Provide irqentry_exit_cond_resched() static callinclude/linux/entry-common.h kernel/entry/common.c+13 -12 replies
7/7preempt/dynamic: Support dynamic preempt with preempt= boot optionkernel/sched/core.c+66 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/7] preempt: Tune preemption flavour on boot v3

This is a reworked version of what came out of the debate between Michal Hocko and Peter Zijlstra in order to tune the preemption mode from kernel parameters, see v2 in:

https://lore.kernel.org/lkml/[email protected]/

I mostly fetched the raw diff from Peter's proof of concept using static calls + a few cherry picking here and there + some rework from my end. The result is still not complete, I still need to handle __cond_resched_lock() and other CONFIG_PREEMPT specifics. And also some others cleanup patches that were in Michal's series.

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
preempt/dynamic

HEAD: 764be94f20534c96e6f5a16922ad81c0a3bcd868

Thanks,
Frederic
---

Peter Zijlstra (Intel) (4):
preempt/dynamic: Provide cond_resched() and might_resched() static calls preempt/dynamic: Provide preempt_schedule[_notrace]() static calls preempt/dynamic: Provide irqentry_exit_cond_resched() static call preempt/dynamic: Support dynamic preempt with preempt= boot option

Peter Zijlstra (2):
static_call/x86: Add __static_call_returnl0()
static_call: Pull some static_call declarations to the type headers

Michal Hocko (1):
preempt: Introduce CONFIG_PREEMPT_DYNAMIC

 Documentation/admin-guide/kernel-parameters.txt |  7 ++
 arch/Kconfig                                    |  9 +++
 arch/x86/Kconfig                                |  1 +
 arch/x86/include/asm/preempt.h                  | 34 ++++++---
 arch/x86/include/asm/text-patching.h            | 26 ++++++-
 arch/x86/kernel/alternative.c                   |  5 ++
 arch/x86/kernel/static_call.c                   | 10 ++-
 include/linux/entry-common.h                    |  4 ++
 include/linux/kernel.h                          | 22 +++++-
 include/linux/sched.h                           | 27 ++++++-
 include/linux/static_call.h                     | 21 ------
 include/linux/static_call_types.h               | 33 +++++++++
 kernel/Kconfig.preempt                          | 19 +++++
 kernel/entry/common.c                           | 10 ++-
 kernel/sched/core.c                             | 93 ++++++++++++++++++++++++-
 kernel/static_call.c                            | 10 +++
 16 files changed, 289 insertions(+), 42 deletions(-)