linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] arm64 / sched/preempt: support PREEMPT_DYNAMIC with static keys
@ 2021-11-09 17:24 Mark Rutland
  2021-11-09 17:24 ` [PATCH 1/6] sched/preempt: move PREEMPT_DYNAMIC logic later Mark Rutland
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Mark Rutland @ 2021-11-09 17:24 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: ardb, catalin.marinas, frederic, juri.lelli, linux-kernel,
	mark.rutland, mingo, peterz, will

This series enables PREEMPT_DYNAMIC on arm64, offering an alternative approach
to other efforts which rely on enabling static_calls, e.g. as Ard is currently
attempting:

  https://lore.kernel.org/linux-arm-kernel/20211105145917.2828911-1-ardb@kernel.org/

For a number of reasons (laid out in grauitous detail in patch 5), static calls
are somewhat painful on arm64. For PREEMPT_DYNAMIC specifically where we're
only enabling/disabling functions rather than targetting multiple distinct
callees, (non-inline) static calls don't buy us much over placing early returns
in the preemption functions, which this series implements using static keys.

The first 4 patches are largely cleanup, and I think might make sense on their
own. Patch 3 specifically change the behaviour on x86 where I believe there's
simply an oversight, called out in the commit message.

I think the diffstate can be reduced a bit by with some helper macros to reduce
amount of boilerplate needed for the callees. There's also some room for
cleanup of the existing preempt logic to require less arch code (other than
where x86 has to override that today).

I've given this very light build+boot testing so far.

Thanks,
Mark.

Mark Rutland (6):
  sched/preempt: move PREEMPT_DYNAMIC logic later
  sched/preempt: refactor sched_dynamic_update()
  sched/preempt: simplify irqentry_exit_cond_resched() callers
  sched/preempt: decouple HAVE_PREEMPT_DYNAMIC from GENERIC_ENTRY
  sched/preempt: add PREEMPT_DYNAMIC using static keys
  arm64: support PREEMPT_DYNAMIC

 arch/Kconfig                     |  14 +-
 arch/arm64/Kconfig               |   1 +
 arch/arm64/include/asm/preempt.h |  16 +-
 arch/arm64/kernel/entry-common.c |   9 +
 arch/x86/Kconfig                 |   2 +-
 arch/x86/include/asm/preempt.h   |  10 +-
 include/linux/entry-common.h     |  15 +-
 include/linux/kernel.h           |   7 +-
 include/linux/sched.h            |  10 +-
 kernel/entry/common.c            |  22 ++-
 kernel/sched/core.c              | 347 +++++++++++++++++++++++----------------
 11 files changed, 293 insertions(+), 160 deletions(-)

-- 
2.11.0


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

end of thread, other threads:[~2022-02-03 22:41 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 17:24 [PATCH 0/6] arm64 / sched/preempt: support PREEMPT_DYNAMIC with static keys Mark Rutland
2021-11-09 17:24 ` [PATCH 1/6] sched/preempt: move PREEMPT_DYNAMIC logic later Mark Rutland
2021-11-09 17:24 ` [PATCH 2/6] sched/preempt: refactor sched_dynamic_update() Mark Rutland
2021-12-10 15:13   ` Frederic Weisbecker
2022-02-02 15:13     ` Mark Rutland
2022-02-02 16:01       ` Frederic Weisbecker
2022-02-02 18:08         ` Mark Rutland
2022-02-03 11:52           ` Frederic Weisbecker
2021-11-09 17:24 ` [PATCH 3/6] sched/preempt: simplify irqentry_exit_cond_resched() callers Mark Rutland
2021-11-09 17:24 ` [PATCH 4/6] sched/preempt: decouple HAVE_PREEMPT_DYNAMIC from GENERIC_ENTRY Mark Rutland
2021-11-09 17:24 ` [PATCH 5/6] sched/preempt: add PREEMPT_DYNAMIC using static keys Mark Rutland
2021-12-13 22:05   ` Frederic Weisbecker
2022-02-02 15:29     ` Mark Rutland
2022-02-03 22:40     ` Peter Zijlstra
2022-02-02 23:21   ` Frederic Weisbecker
2022-02-03  9:51     ` Mark Rutland
2022-02-03 11:34       ` Frederic Weisbecker
2022-02-03 12:27         ` Mark Rutland
2021-11-09 17:24 ` [PATCH 6/6] arm64: support PREEMPT_DYNAMIC Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).