linux-rt-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] preempt: Add a generic function to return the preemption string.
@ 2025-02-12 13:41 Sebastian Andrzej Siewior
  2025-02-12 13:41 ` [PATCH v3 1/9] sched: " Sebastian Andrzej Siewior
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-02-12 13:41 UTC (permalink / raw)
  To: linux-kernel, linux-rt-devel
  Cc: Ben Segall, Catalin Marinas, Dietmar Eggemann, Ingo Molnar,
	Juri Lelli, Mel Gorman, Peter Zijlstra, Shrikanth Hegde,
	Steven Rostedt, Thomas Gleixner, Valentin Schneider,
	Vincent Guittot, Will Deacon, Sebastian Andrzej Siewior

The individual architectures often add the preemption model to the begin
of the backtrace. This is the case on X86 or ARM64 for the "die" case
but not for regular warning. With the addition of DYNAMIC_PREEMPT for
PREEMPT_RT we end up with CONFIG_PREEMPT and CONFIG_PREEMPT_RT set
simultaneously. That means that everyone who tried to add that piece of
information gets it wrong for PREEMPT_RT because PREEMPT is checked
first.

This series adds a generic helper which is used by
dump_stack_print_info() and other architectures which don't use the
function and provide this information on their own.

I collected ACKs for all architectures but x86.

v2…v3 https://lore.kernel.org/all/20250203141632.440554-1-bigeasy@linutronix.de/
  - powerpc/ s390 and xtensa had the preemption string twice. Removed
    from the arch code.
  - Keeping the same printk() invocation, avoiding adding any level.
  - #1 has now a table showing which strings are possible.

RFC…v2 https://lore.kernel.org/all/20241206113431.Q-VXMlru@linutronix.de/
  - Split into individual patches.
  - Implement preempt_model_str() based on feedback by Peter Zijlstra
    and Steven Rostedt.

Sebastian Andrzej Siewior (9):
  sched: Add a generic function to return the preemption string.
  lib/dump_stack: Use preempt_model_str().
  arm: Rely on generic printing of preemption model.
  arm64: Rely on generic printing of preemption model.
  powerpc: Rely on generic printing of preemption model.
  s390: Rely on generic printing of preemption model.
  x86: Rely on generic printing of preemption model.
  xtensa: Rely on generic printing of preemption model.
  tracing: Use preempt_model_str().

 arch/arm/kernel/traps.c      | 11 ++-------
 arch/arm64/kernel/traps.c    | 10 +-------
 arch/powerpc/kernel/traps.c  |  3 +--
 arch/s390/kernel/dumpstack.c |  7 +-----
 arch/x86/kernel/dumpstack.c  |  9 ++-----
 arch/xtensa/kernel/traps.c   |  6 +----
 include/linux/preempt.h      |  2 ++
 kernel/sched/core.c          | 47 ++++++++++++++++++++++++++++++++++++
 kernel/sched/debug.c         | 10 +++++---
 kernel/sched/sched.h         |  1 +
 kernel/trace/trace.c         |  7 +-----
 lib/dump_stack.c             |  4 +--
 12 files changed, 67 insertions(+), 50 deletions(-)

Sebastian

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

end of thread, other threads:[~2025-02-12 18:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 13:41 [PATCH v3 0/9] preempt: Add a generic function to return the preemption string Sebastian Andrzej Siewior
2025-02-12 13:41 ` [PATCH v3 1/9] sched: " Sebastian Andrzej Siewior
2025-02-12 13:41 ` [PATCH v3 2/9] lib/dump_stack: Use preempt_model_str() Sebastian Andrzej Siewior
2025-02-12 13:41 ` [PATCH v3 3/9] arm: Rely on generic printing of preemption model Sebastian Andrzej Siewior
2025-02-12 15:58   ` Russell King (Oracle)
2025-02-12 13:41 ` [PATCH v3 4/9] arm64: " Sebastian Andrzej Siewior
2025-02-12 18:41   ` Catalin Marinas
2025-02-12 13:41 ` [PATCH v3 5/9] powerpc: " Sebastian Andrzej Siewior
2025-02-12 13:41 ` [PATCH v3 6/9] s390: " Sebastian Andrzej Siewior
2025-02-12 13:41 ` [PATCH v3 7/9] x86: " Sebastian Andrzej Siewior
2025-02-12 13:41 ` [PATCH v3 8/9] xtensa: " Sebastian Andrzej Siewior
2025-02-12 13:41 ` [PATCH v3 9/9] tracing: Use preempt_model_str() Sebastian Andrzej Siewior

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).