Skip to contentSkip to conversation

preempt: Add a generic function to return the preemption string.

PATCH Applied Sebastian Andrzej Siewior 3 participants 29 messages Mar 14, 2025 – Mar 17, 2025

Subsystems (11)
lore
Share & tools
lore

Sebastian Andrzej Siewior

author maintainer
#0 lore raw

v4 cover preempt: Add a generic function to return the preemption string.

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.

v3…v4 https://lore.kernel.org/all/[email protected]/
- repost

v2…v3 https://lore.kernel.org/all/[email protected]/
- 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/[email protected]/
- 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(-)
Signature · 1 line
2.47.2
author maintainer
#1 lore raw

PATCH v4 1/9 sched: Add a generic function to return the preemption string.

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.

Provide a generic function which returns the current scheduling model considering LAZY preempt and the current state of PREEMPT_DYNAMIC.

The resulting strings are:

┏━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃   Model   ┃  -RT -DYN    ┃     +RT -DYN      ┃     -RT +DYN       ┃     +RT +DYN      ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│NONE       │ NONE         │ n/a               │ PREEMPT(none)      │ n/a               │
├───────────┼──────────────┼───────────────────┼────────────────────┼───────────────────┤
│VOLUNTARY  │ VOLUNTARY    │ n/a               │ PREEMPT(voluntary) │ n/a               │
├───────────┼──────────────┼───────────────────┼────────────────────┼───────────────────┤
│FULL       │ PREEMPT      │ PREEMPT_RT        │ PREEMPT(full)      │ PREEMPT_{RT,full} │
├───────────┼──────────────┼───────────────────┼────────────────────┼───────────────────┤
│LAZY       │ PREEMPT_LAZY │ PREEMPT_{RT,LAZY} │ PREEMPT(lazy)      │ PREEMPT_{RT,lazy} │
└───────────┴──────────────┴───────────────────┴────────────────────┴───────────────────┘

[ The dynamic building of the string can lead to an empty string if the
function is invoked simultaneously on two CPUs. ]

---
 include/linux/preempt.h |  2 ++
 kernel/sched/core.c     | 47 +++++++++++++++++++++++++++++++++++++++++
 kernel/sched/debug.c    | 10 +++++----
 kernel/sched/sched.h    |  1 +
 4 files changed, 56 insertions(+), 4 deletions(-)
include/linux/preempt.h +2 -0
index ca86235ac15c0..3e9808f2b5491 100644
@@ -515,6 +515,8 @@ static inline bool preempt_model_rt(void)
 	return IS_ENABLED(CONFIG_PREEMPT_RT);
 }
 
+extern const char *preempt_model_str(void);
+
 /*
  * Does the preemption model allow non-cooperative preemption?
  *
kernel/sched/core.c +47 -0

57 lines not on this page · raw message

kernel/sched/debug.c +6 -4
index ef047add7f9e6..39be73969d284 100644
@@ -244,11 +244,13 @@ static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf,
 
 static int sched_dynamic_show(struct seq_file *m, void *v)
 {
-	static const char * preempt_modes[] = {
-		"none", "voluntary", "full", "lazy",
-	};
-	int j = ARRAY_SIZE(preempt_modes) - !IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY);
 	int i = IS_ENABLED(CONFIG_PREEMPT_RT) * 2;
+	int j;
+
+	/* Count entries in NULL terminated preempt_modes */
+	for (j = 0; preempt_modes[j]; j++)
+		;
+	j -= !IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY);
 
 	for (; i < j; i++) {
 		if (preempt_dynamic_mode == i)
kernel/sched/sched.h +1 -0
index c8512a9fb0229..9c3252fbaee08 100644
@@ -3619,6 +3619,7 @@ extern int preempt_dynamic_mode;
 extern int sched_dynamic_mode(const char *str);
 extern void sched_dynamic_update(int mode);
 #endif
+extern const char *preempt_modes[];
 
 #ifdef CONFIG_SCHED_MM_CID
 
Signature · 1 line
2.47.2
#2 lore raw

Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.

kernel/sched/debug.c static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, · line 252

Quoted 7 lines · Sebastian Andrzej Siewior
kernel/sched/debug.c +6 -0
+const char *preempt_modes[] = {
+	"none", "voluntary", "full", "lazy", NULL,
+};
 
+	/* Count entries in NULL terminated preempt_modes */
+	for (j = 0; preempt_modes[j]; j++)
+		;

I'm pretty sure the build-time ARRAY_SIZE() primitive is superior here. ;-)

Thanks,

Ingo

author maintainer
#3 lore raw

Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.

Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Sebastian Andrzej Siewior
kernel/sched/core.c +3 -0
+const char *preempt_modes[] = {
+	"none", "voluntary", "full", "lazy", NULL,
+};
Quoted 5 lines

kernel/sched/debug.c static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, · line 252

Quoted 3 lines
kernel/sched/debug.c +3 -0
+	/* Count entries in NULL terminated preempt_modes */
+	for (j = 0; preempt_modes[j]; j++)
+		;

I'm pretty sure the build-time ARRAY_SIZE() primitive is superior here. ;-)

It would be but it is not an option.
That array is defined in core.c where it is "always" required while debug.c needs it optionally. core.c is its one compile unit while debug.c is included by build_utility.c. So I don't see how this can work unless we shift things:

|   CC      kernel/sched/build_utility.o
| In file included from include/linux/kernel.h:16,
|                  from include/linux/cpumask.h:11,
|                  from include/linux/smp.h:13,
|                  from include/linux/sched/clock.h:5,
|                  from kernel/sched/build_utility.c:12:
| kernel/sched/debug.c: In function ‘sched_dynamic_show’:
| include/linux/array_size.h:11:32: error: invalid application of ‘sizeof’ to incomplete type ‘const char *[]’
|    11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
|       |                                ^
| kernel/sched/debug.c:250:13: note: in expansion of macro ‘ARRAY_SIZE’
|   250 |         j = ARRAY_SIZE(preempt_modes);
|       |             ^~~~~~~~~~
Quoted 3 lines

Thanks,

Ingo

Sebastian

#4 lore raw

Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.

Quoted 14 lines · Sebastian Andrzej Siewior
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Sebastian Andrzej Siewior
kernel/sched/core.c +3 -0
+const char *preempt_modes[] = {
+	"none", "voluntary", "full", "lazy", NULL,
+};
Quoted 5 lines

kernel/sched/debug.c static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, · line 252

Quoted 3 lines
kernel/sched/debug.c +3 -0
+	/* Count entries in NULL terminated preempt_modes */
+	for (j = 0; preempt_modes[j]; j++)
+		;

I'm pretty sure the build-time ARRAY_SIZE() primitive is superior here. ;-)

Quoted 5 lines

It would be but it is not an option.
That array is defined in core.c where it is "always" required while debug.c needs it optionally. core.c is its one compile unit while debug.c is included by build_utility.c. So I don't see how this can work unless we shift things:

Why not have it all in debug.c?

Thanks,

Ingo

author maintainer
#5 lore raw

Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.

Quoted 17 lines · Ingo Molnar
Quoted 14 lines · Sebastian Andrzej Siewior
Quoted 12 lines · Ingo Molnar

kernel/sched/debug.c static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, · line 252

Quoted 7 lines · Sebastian Andrzej Siewior
kernel/sched/debug.c +6 -0
+const char *preempt_modes[] = {
+	"none", "voluntary", "full", "lazy", NULL,
+};
 
+	/* Count entries in NULL terminated preempt_modes */
+	for (j = 0; preempt_modes[j]; j++)
+		;

I'm pretty sure the build-time ARRAY_SIZE() primitive is superior here. ;-)

Quoted 7 lines
Quoted 5 lines

It would be but it is not an option.
That array is defined in core.c where it is "always" required while debug.c needs it optionally. core.c is its one compile unit while debug.c is included by build_utility.c. So I don't see how this can work unless we shift things:

Why not have it all in debug.c?

The debug.c include is behind CONFIG_SCHED_DEBUG. This needs to be moved into debug.c itself so that code can be added regardless of CONFIG_SCHED_DEBUG. It is not only sched-debug after that.

Then we have `preempt_dynamic_mode' logic which is in core.c but it is exported and used in debug.c
So if all this is not a concern then I can move it.

Quoted 3 lines

Thanks,

Ingo

Sebastian

#6 lore raw

Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.

Quoted 24 lines · Sebastian Andrzej Siewior
Quoted 23 lines · Ingo Molnar
Quoted 19 lines · Sebastian Andrzej Siewior
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Sebastian Andrzej Siewior
kernel/sched/core.c +3 -0
+const char *preempt_modes[] = {
+	"none", "voluntary", "full", "lazy", NULL,
+};
Quoted 5 lines

kernel/sched/debug.c static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, · line 252

Quoted 3 lines
kernel/sched/debug.c +3 -0
+	/* Count entries in NULL terminated preempt_modes */
+	for (j = 0; preempt_modes[j]; j++)
+		;

I'm pretty sure the build-time ARRAY_SIZE() primitive is superior here. ;-)

It would be but it is not an option.
That array is defined in core.c where it is "always" required while debug.c needs it optionally. core.c is its one compile unit while debug.c is included by build_utility.c. So I don't see how this can work unless we shift things:

Quoted 5 lines
Quoted 1 line

Why not have it all in debug.c?

The debug.c include is behind CONFIG_SCHED_DEBUG. This needs to be moved into debug.c itself so that code can be added regardless of CONFIG_SCHED_DEBUG. It is not only sched-debug after that.

Yeah, that's a valid concern.

The thing is, CONFIG_SCHED_DEBUG is mostly meaningless these days - all major distributions enable it because of the statistics are useful for system administration, tooling and general software development.

So we should enable it permanently and remove the #ifdeffery. I'll send out a series to do so soon.

Thanks,

Ingo

author maintainer
#7 lore raw

Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.

Quoted 8 lines · Ingo Molnar

Yeah, that's a valid concern.

The thing is, CONFIG_SCHED_DEBUG is mostly meaningless these days - all major distributions enable it because of the statistics are useful for system administration, tooling and general software development.

So we should enable it permanently and remove the #ifdeffery. I'll send out a series to do so soon.

If that is the way to go, the please Cc me and I rebase on top of it.

Quoted 3 lines

Thanks,

Ingo

Sebastian

#8 lore raw

Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.

Quoted 11 lines · Sebastian Andrzej Siewior
Quoted 8 lines · Ingo Molnar

Yeah, that's a valid concern.

The thing is, CONFIG_SCHED_DEBUG is mostly meaningless these days - all major distributions enable it because of the statistics are useful for system administration, tooling and general software development.

So we should enable it permanently and remove the #ifdeffery. I'll send out a series to do so soon.

If that is the way to go, the please Cc me and I rebase on top of it.

Let's do it the other way around - your series is mature enough I think, and the merge window is close.

Thanks,

Ingo

#9 lore raw

Re: [PATCH v4 1/9] sched: Add a generic function to return the preemption string.

In reply to Ingo Molnar
Quoted 33 lines · Ingo Molnar
Quoted 24 lines · Sebastian Andrzej Siewior
Quoted 23 lines · Ingo Molnar
Quoted 19 lines · Sebastian Andrzej Siewior
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Sebastian Andrzej Siewior
kernel/sched/core.c +3 -0
+const char *preempt_modes[] = {
+	"none", "voluntary", "full", "lazy", NULL,
+};
Quoted 5 lines

kernel/sched/debug.c static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, · line 252

Quoted 3 lines
kernel/sched/debug.c +3 -0
+	/* Count entries in NULL terminated preempt_modes */
+	for (j = 0; preempt_modes[j]; j++)
+		;

I'm pretty sure the build-time ARRAY_SIZE() primitive is superior here. ;-)

It would be but it is not an option.
That array is defined in core.c where it is "always" required while debug.c needs it optionally. core.c is its one compile unit while debug.c is included by build_utility.c. So I don't see how this can work unless we shift things:

Quoted 5 lines
Quoted 1 line

Why not have it all in debug.c?

The debug.c include is behind CONFIG_SCHED_DEBUG. This needs to be moved into debug.c itself so that code can be added regardless of CONFIG_SCHED_DEBUG. It is not only sched-debug after that.

Quoted 8 lines

Yeah, that's a valid concern.

The thing is, CONFIG_SCHED_DEBUG is mostly meaningless these days - all major distributions enable it because of the statistics are useful for system administration, tooling and general software development.

So we should enable it permanently and remove the #ifdeffery. I'll send out a series to do so soon.

Here's the series:

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

Ingo Molnar (5):
sched/debug: Change SCHED_WARN_ON() to WARN_ON_ONCE()
sched/debug: Make 'const_debug' tunables unconditional __read_mostly sched/debug: Make CONFIG_SCHED_DEBUG functionality unconditional sched/debug, Documentation: Remove (most) CONFIG_SCHED_DEBUG references from documentation sched/debug: Remove CONFIG_SCHED_DEBUG

Forgot to Cc: you - will do so in future versions.

Thanks,

Ingo

#10 lore raw

[tip: sched/core] sched: Add a generic function to return the preemption string

In reply to Sebastian Andrzej Siewior
The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     8bdc5daaa01e3054647d394d354762210ad88f17
Gitweb:        https://git.kernel.org/tip/8bdc5daaa01e3054647d394d354762210ad88f17
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:02 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:38 +01:00

sched: Add a generic function to return the preemption string

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.

Provide a generic function which returns the current scheduling model considering LAZY preempt and the current state of PREEMPT_DYNAMIC.

The resulting strings are:

┏━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃   Model   ┃  -RT -DYN    ┃     +RT -DYN      ┃     -RT +DYN       ┃     +RT +DYN      ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│NONE       │ NONE         │ n/a               │ PREEMPT(none)      │ n/a               │
├───────────┼──────────────┼───────────────────┼────────────────────┼───────────────────┤
│VOLUNTARY  │ VOLUNTARY    │ n/a               │ PREEMPT(voluntary) │ n/a               │
├───────────┼──────────────┼───────────────────┼────────────────────┼───────────────────┤
│FULL       │ PREEMPT      │ PREEMPT_RT        │ PREEMPT(full)      │ PREEMPT_{RT,full} │
├───────────┼──────────────┼───────────────────┼────────────────────┼───────────────────┤
│LAZY       │ PREEMPT_LAZY │ PREEMPT_{RT,LAZY} │ PREEMPT(lazy)      │ PREEMPT_{RT,lazy} │
└───────────┴──────────────┴───────────────────┴────────────────────┴───────────────────┘

[ The dynamic building of the string can lead to an empty string if the
function is invoked simultaneously on two CPUs. ]

---
 include/linux/preempt.h |  2 ++-
 kernel/sched/core.c     | 47 ++++++++++++++++++++++++++++++++++++++++-
 kernel/sched/debug.c    | 10 +++++----
 kernel/sched/sched.h    |  1 +-
 4 files changed, 56 insertions(+), 4 deletions(-)
include/linux/preempt.h +2 -0
index ca86235..3e9808f 100644
@@ -515,6 +515,8 @@ static inline bool preempt_model_rt(void)
 	return IS_ENABLED(CONFIG_PREEMPT_RT);
 }
 
+extern const char *preempt_model_str(void);
+
 /*
  * Does the preemption model allow non-cooperative preemption?
  *
kernel/sched/core.c +47 -0

57 lines not on this page · raw message

kernel/sched/debug.c +6 -4
index ef047ad..39be739 100644
@@ -244,11 +244,13 @@ static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf,
 
 static int sched_dynamic_show(struct seq_file *m, void *v)
 {
-	static const char * preempt_modes[] = {
-		"none", "voluntary", "full", "lazy",
-	};
-	int j = ARRAY_SIZE(preempt_modes) - !IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY);
 	int i = IS_ENABLED(CONFIG_PREEMPT_RT) * 2;
+	int j;
+
+	/* Count entries in NULL terminated preempt_modes */
+	for (j = 0; preempt_modes[j]; j++)
+		;
+	j -= !IS_ENABLED(CONFIG_ARCH_HAS_PREEMPT_LAZY);
 
 	for (; i < j; i++) {
 		if (preempt_dynamic_mode == i)
kernel/sched/sched.h +1 -0
index 0212a0c..e8915ad 100644
@@ -3633,6 +3633,7 @@ extern int preempt_dynamic_mode;
 extern int sched_dynamic_mode(const char *str);
 extern void sched_dynamic_update(int mode);
 #endif
+extern const char *preempt_modes[];
 
 #ifdef CONFIG_SCHED_MM_CID
 
author maintainer
#11 lore raw

PATCH v4 2/9 lib/dump_stack: Use preempt_model_str().

In reply to Sebastian Andrzej Siewior

Use preempt_model_str() to print the current preemption model. Use pr_warn() instead of printk() to pass a loglevel. This makes it part of generic WARN/ BUG traces.

---
 lib/dump_stack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/dump_stack.c +2 -2
index 388da1aea14a5..b3a85fe8b673e 100644
@@ -54,7 +54,7 @@ void __init dump_stack_set_arch_desc(const char *fmt, ...)
  */
 void dump_stack_print_info(const char *log_lvl)
 {
-	printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s" BUILD_ID_FMT "\n",
+	printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s %s " BUILD_ID_FMT "\n",
 	       log_lvl, raw_smp_processor_id(),
 	       __kuid_val(current_real_cred()->euid),
 	       current->pid, current->comm,
@@ -62,7 +62,7 @@ void dump_stack_print_info(const char *log_lvl)
 	       print_tainted(),
 	       init_utsname()->release,
 	       (int)strcspn(init_utsname()->version, " "),
-	       init_utsname()->version, BUILD_ID_VAL);
+	       init_utsname()->version, preempt_model_str(), BUILD_ID_VAL);
 
 	if (get_taint())
 		printk("%s%s\n", log_lvl, print_tainted_verbose());
Signature · 1 line
2.47.2
#12 lore raw

[tip: sched/core] lib/dump_stack: Use preempt_model_str()

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     d167706f68ee22635a244bd414927f4202a3e942
Gitweb:        https://git.kernel.org/tip/d167706f68ee22635a244bd414927f4202a3e942
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:03 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:39 +01:00

lib/dump_stack: Use preempt_model_str()

Use preempt_model_str() to print the current preemption model. Use pr_warn() instead of printk() to pass a loglevel. This makes it part of generic WARN/ BUG traces.

---
 lib/dump_stack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/dump_stack.c +2 -2
index 388da1a..b3a85fe 100644
@@ -54,7 +54,7 @@ void __init dump_stack_set_arch_desc(const char *fmt, ...)
  */
 void dump_stack_print_info(const char *log_lvl)
 {
-	printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s" BUILD_ID_FMT "\n",
+	printk("%sCPU: %d UID: %u PID: %d Comm: %.20s %s%s %s %.*s %s " BUILD_ID_FMT "\n",
 	       log_lvl, raw_smp_processor_id(),
 	       __kuid_val(current_real_cred()->euid),
 	       current->pid, current->comm,
@@ -62,7 +62,7 @@ void dump_stack_print_info(const char *log_lvl)
 	       print_tainted(),
 	       init_utsname()->release,
 	       (int)strcspn(init_utsname()->version, " "),
-	       init_utsname()->version, BUILD_ID_VAL);
+	       init_utsname()->version, preempt_model_str(), BUILD_ID_VAL);
 
 	if (get_taint())
 		printk("%s%s\n", log_lvl, print_tainted_verbose());
author maintainer
#13 lore raw

PATCH v4 3/9 arm: Rely on generic printing of preemption model.

In reply to Sebastian Andrzej Siewior

__die() invokes later __show_regs() -> show_regs_print_info() which prints the current preemption model.
Remove it from the initial line.

---
 arch/arm/kernel/traps.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
arch/arm/kernel/traps.c +2 -9
index 6ea645939573f..afbd2ebe5c39d 100644
@@ -258,13 +258,6 @@ void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
 	barrier();
 }
 
-#ifdef CONFIG_PREEMPT
-#define S_PREEMPT " PREEMPT"
-#elif defined(CONFIG_PREEMPT_RT)
-#define S_PREEMPT " PREEMPT_RT"
-#else
-#define S_PREEMPT ""
-#endif
 #ifdef CONFIG_SMP
 #define S_SMP " SMP"
 #else
@@ -282,8 +275,8 @@ static int __die(const char *str, int err, struct pt_regs *regs)
 	static int die_counter;
 	int ret;
 
-	pr_emerg("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP S_ISA "\n",
-	         str, err, ++die_counter);
+	pr_emerg("Internal error: %s: %x [#%d]" S_SMP S_ISA "\n",
+		 str, err, ++die_counter);
 
 	/* trap and error numbers are mostly meaningless on ARM */
 	ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV);
Signature · 1 line
2.47.2
#14 lore raw

[tip: sched/core] arm: Rely on generic printing of preemption model

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     03288138baa522d143a208c2b7ab2931f26ef07f
Gitweb:        https://git.kernel.org/tip/03288138baa522d143a208c2b7ab2931f26ef07f
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:04 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:39 +01:00

arm: Rely on generic printing of preemption model

__die() invokes later __show_regs() -> show_regs_print_info() which prints the current preemption model.
Remove it from the initial line.

---
 arch/arm/kernel/traps.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
arch/arm/kernel/traps.c +2 -9
index 6ea6459..afbd2eb 100644
@@ -258,13 +258,6 @@ void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
 	barrier();
 }
 
-#ifdef CONFIG_PREEMPT
-#define S_PREEMPT " PREEMPT"
-#elif defined(CONFIG_PREEMPT_RT)
-#define S_PREEMPT " PREEMPT_RT"
-#else
-#define S_PREEMPT ""
-#endif
 #ifdef CONFIG_SMP
 #define S_SMP " SMP"
 #else
@@ -282,8 +275,8 @@ static int __die(const char *str, int err, struct pt_regs *regs)
 	static int die_counter;
 	int ret;
 
-	pr_emerg("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP S_ISA "\n",
-	         str, err, ++die_counter);
+	pr_emerg("Internal error: %s: %x [#%d]" S_SMP S_ISA "\n",
+		 str, err, ++die_counter);
 
 	/* trap and error numbers are mostly meaningless on ARM */
 	ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV);
author maintainer
#15 lore raw

PATCH v4 4/9 arm64: Rely on generic printing of preemption model.

In reply to Sebastian Andrzej Siewior

__die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model.
Remove it from the initial line.

---
 arch/arm64/kernel/traps.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/arm64/kernel/traps.c +1 -9
index 4e26bd356a482..529cff825531c 100644
@@ -172,14 +172,6 @@ static void dump_kernel_instr(const char *lvl, struct pt_regs *regs)
 	printk("%sCode: %s\n", lvl, str);
 }
 
-#ifdef CONFIG_PREEMPT
-#define S_PREEMPT " PREEMPT"
-#elif defined(CONFIG_PREEMPT_RT)
-#define S_PREEMPT " PREEMPT_RT"
-#else
-#define S_PREEMPT ""
-#endif
-
 #define S_SMP " SMP"
 
 static int __die(const char *str, long err, struct pt_regs *regs)
@@ -187,7 +179,7 @@ static int __die(const char *str, long err, struct pt_regs *regs)
 	static int die_counter;
 	int ret;
 
-	pr_emerg("Internal error: %s: %016lx [#%d]" S_PREEMPT S_SMP "\n",
+	pr_emerg("Internal error: %s: %016lx [#%d] " S_SMP "\n",
 		 str, err, ++die_counter);
 
 	/* trap and error numbers are mostly meaningless on ARM */
Signature · 1 line
2.47.2
#16 lore raw

[tip: sched/core] arm64: Rely on generic printing of preemption model

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     4769437de0e2dd9d2660499a72d5e58b7072b786
Gitweb:        https://git.kernel.org/tip/4769437de0e2dd9d2660499a72d5e58b7072b786
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:05 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:39 +01:00

arm64: Rely on generic printing of preemption model

__die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model.
Remove it from the initial line.

---
 arch/arm64/kernel/traps.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
arch/arm64/kernel/traps.c +1 -9
index 4e26bd3..529cff8 100644
@@ -172,14 +172,6 @@ static void dump_kernel_instr(const char *lvl, struct pt_regs *regs)
 	printk("%sCode: %s\n", lvl, str);
 }
 
-#ifdef CONFIG_PREEMPT
-#define S_PREEMPT " PREEMPT"
-#elif defined(CONFIG_PREEMPT_RT)
-#define S_PREEMPT " PREEMPT_RT"
-#else
-#define S_PREEMPT ""
-#endif
-
 #define S_SMP " SMP"
 
 static int __die(const char *str, long err, struct pt_regs *regs)
@@ -187,7 +179,7 @@ static int __die(const char *str, long err, struct pt_regs *regs)
 	static int die_counter;
 	int ret;
 
-	pr_emerg("Internal error: %s: %016lx [#%d]" S_PREEMPT S_SMP "\n",
+	pr_emerg("Internal error: %s: %016lx [#%d] " S_SMP "\n",
 		 str, err, ++die_counter);
 
 	/* trap and error numbers are mostly meaningless on ARM */
author maintainer
#17 lore raw

PATCH v4 5/9 powerpc: Rely on generic printing of preemption model.

In reply to Sebastian Andrzej Siewior

After the first printk in __die() there is show_regs() -> show_regs_print_info() which prints the current preemption model.

Remove the preempion model from the arch code.

---
 arch/powerpc/kernel/traps.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/kernel/traps.c +1 -2
index edf5cabe5dfdb..cb8e9357383e9 100644
@@ -263,10 +263,9 @@ static int __die(const char *str, struct pt_regs *regs, long err)
 {
 	printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
 
-	printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n",
+	printk("%s PAGE_SIZE=%luK%s %s%s%s%s %s\n",
 	       IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
 	       PAGE_SIZE / 1024, get_mmu_str(),
-	       IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
 	       IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
 	       IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "",
 	       debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
Signature · 1 line
2.47.2
#18 lore raw

[tip: sched/core] powerpc: Rely on generic printing of preemption model

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     732ed149f7ac6278e33ccd62d13c604a134e6933
Gitweb:        https://git.kernel.org/tip/732ed149f7ac6278e33ccd62d13c604a134e6933
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:06 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:39 +01:00

powerpc: Rely on generic printing of preemption model

After the first printk in __die() there is show_regs() -> show_regs_print_info() which prints the current preemption model.

Remove the preempion model from the arch code.

---
 arch/powerpc/kernel/traps.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/kernel/traps.c +1 -2
index edf5cab..cb8e935 100644
@@ -263,10 +263,9 @@ static int __die(const char *str, struct pt_regs *regs, long err)
 {
 	printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter);
 
-	printk("%s PAGE_SIZE=%luK%s%s%s%s%s%s %s\n",
+	printk("%s PAGE_SIZE=%luK%s %s%s%s%s %s\n",
 	       IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) ? "LE" : "BE",
 	       PAGE_SIZE / 1024, get_mmu_str(),
-	       IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
 	       IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
 	       IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "",
 	       debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
author maintainer
#19 lore raw

PATCH v4 6/9 s390: Rely on generic printing of preemption model.

In reply to Sebastian Andrzej Siewior

die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model.
Remove it from the initial line.

Cc Heiko Carstens <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Alexander Gordeev <[email protected]>
Cc Christian Borntraeger <[email protected]>
---
 arch/s390/kernel/dumpstack.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/s390/kernel/dumpstack.c +1 -6
index 1ecd0580561f6..911b95cd57e58 100644
@@ -198,13 +198,8 @@ void __noreturn die(struct pt_regs *regs, const char *str)
 	console_verbose();
 	spin_lock_irq(&die_lock);
 	bust_spinlocks(1);
-	printk("%s: %04x ilc:%d [#%d] ", str, regs->int_code & 0xffff,
+	printk("%s: %04x ilc:%d [#%d]", str, regs->int_code & 0xffff,
 	       regs->int_code >> 17, ++die_counter);
-#ifdef CONFIG_PREEMPT
-	pr_cont("PREEMPT ");
-#elif defined(CONFIG_PREEMPT_RT)
-	pr_cont("PREEMPT_RT ");
-#endif
 	pr_cont("SMP ");
 	if (debug_pagealloc_enabled())
 		pr_cont("DEBUG_PAGEALLOC");
Signature · 1 line
2.47.2
#20 lore raw

[tip: sched/core] s390: Rely on generic printing of preemption model

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     b70f50be0c74bd9498fba9d33cc548722a2ec879
Gitweb:        https://git.kernel.org/tip/b70f50be0c74bd9498fba9d33cc548722a2ec879
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:07 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:40 +01:00

s390: Rely on generic printing of preemption model

die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model.
Remove it from the initial line.

---
 arch/s390/kernel/dumpstack.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/s390/kernel/dumpstack.c +1 -6
index 1ecd058..911b95c 100644
@@ -198,13 +198,8 @@ void __noreturn die(struct pt_regs *regs, const char *str)
 	console_verbose();
 	spin_lock_irq(&die_lock);
 	bust_spinlocks(1);
-	printk("%s: %04x ilc:%d [#%d] ", str, regs->int_code & 0xffff,
+	printk("%s: %04x ilc:%d [#%d]", str, regs->int_code & 0xffff,
 	       regs->int_code >> 17, ++die_counter);
-#ifdef CONFIG_PREEMPT
-	pr_cont("PREEMPT ");
-#elif defined(CONFIG_PREEMPT_RT)
-	pr_cont("PREEMPT_RT ");
-#endif
 	pr_cont("SMP ");
 	if (debug_pagealloc_enabled())
 		pr_cont("DEBUG_PAGEALLOC");
author maintainer
#21 lore raw

PATCH v4 7/9 x86: Rely on generic printing of preemption model.

In reply to Sebastian Andrzej Siewior

After __die_header(), __die_body() is always invoked. There we have show_regs() -> show_regs_print_info() which prints the current preemption model.
Remove it from the initial line.

Cc Josh Poimboeuf <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc H. Peter Anvin <[email protected]>
---
 arch/x86/kernel/dumpstack.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
arch/x86/kernel/dumpstack.c +2 -7
index a7d562697e50e..91639d1e4ec2c 100644
@@ -395,18 +395,13 @@ NOKPROBE_SYMBOL(oops_end);
 
 static void __die_header(const char *str, struct pt_regs *regs, long err)
 {
-	const char *pr = "";
-
 	/* Save the regs of the first oops for the executive summary later. */
 	if (!die_counter)
 		exec_summary_regs = *regs;
 
-	if (IS_ENABLED(CONFIG_PREEMPTION))
-		pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
-
 	printk(KERN_DEFAULT
-	       "Oops: %s: %04lx [#%d]%s%s%s%s%s\n", str, err & 0xffff,
-	       ++die_counter, pr,
+	       "Oops: %s: %04lx [#%d]%s%s%s%s\n", str, err & 0xffff,
+	       ++die_counter,
 	       IS_ENABLED(CONFIG_SMP)     ? " SMP"             : "",
 	       debug_pagealloc_enabled()  ? " DEBUG_PAGEALLOC" : "",
 	       IS_ENABLED(CONFIG_KASAN)   ? " KASAN"           : "",
Signature · 1 line
2.47.2
#22 lore raw

[tip: sched/core] x86: Rely on generic printing of preemption model

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     96389cf365915b53a53ac88c48b620f7db2e1eff
Gitweb:        https://git.kernel.org/tip/96389cf365915b53a53ac88c48b620f7db2e1eff
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:08 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:40 +01:00

x86: Rely on generic printing of preemption model

After __die_header(), __die_body() is always invoked. There we have show_regs() -> show_regs_print_info() which prints the current preemption model.
Remove it from the initial line.

---
 arch/x86/kernel/dumpstack.c |  9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
arch/x86/kernel/dumpstack.c +2 -7
index a7d5626..91639d1 100644
@@ -395,18 +395,13 @@ NOKPROBE_SYMBOL(oops_end);
 
 static void __die_header(const char *str, struct pt_regs *regs, long err)
 {
-	const char *pr = "";
-
 	/* Save the regs of the first oops for the executive summary later. */
 	if (!die_counter)
 		exec_summary_regs = *regs;
 
-	if (IS_ENABLED(CONFIG_PREEMPTION))
-		pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
-
 	printk(KERN_DEFAULT
-	       "Oops: %s: %04lx [#%d]%s%s%s%s%s\n", str, err & 0xffff,
-	       ++die_counter, pr,
+	       "Oops: %s: %04lx [#%d]%s%s%s%s\n", str, err & 0xffff,
+	       ++die_counter,
 	       IS_ENABLED(CONFIG_SMP)     ? " SMP"             : "",
 	       debug_pagealloc_enabled()  ? " DEBUG_PAGEALLOC" : "",
 	       IS_ENABLED(CONFIG_KASAN)   ? " KASAN"           : "",
author maintainer
#23 lore raw

PATCH v4 8/9 xtensa: Rely on generic printing of preemption model.

In reply to Sebastian Andrzej Siewior

die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model.

Remove it from the initial line.

---
 arch/xtensa/kernel/traps.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/xtensa/kernel/traps.c +1 -5
index 38092d21acf8e..44c07c4e0833a 100644
@@ -629,15 +629,11 @@ DEFINE_SPINLOCK(die_lock);
 void __noreturn die(const char * str, struct pt_regs * regs, long err)
 {
 	static int die_counter;
-	const char *pr = "";
-
-	if (IS_ENABLED(CONFIG_PREEMPTION))
-		pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
 
 	console_verbose();
 	spin_lock_irq(&die_lock);
 
-	pr_info("%s: sig: %ld [#%d]%s\n", str, err, ++die_counter, pr);
+	pr_info("%s: sig: %ld [#%d]\n", str, err, ++die_counter);
 	show_regs(regs);
 	if (!user_mode(regs))
 		show_stack(NULL, (unsigned long *)regs->areg[1], KERN_INFO);
Signature · 1 line
2.47.2
#24 lore raw

[tip: sched/core] xtensa: Rely on generic printing of preemption model

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     6966cd46f63205adc07ce4563ebbc3609e1c9fd7
Gitweb:        https://git.kernel.org/tip/6966cd46f63205adc07ce4563ebbc3609e1c9fd7
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:09 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:40 +01:00

xtensa: Rely on generic printing of preemption model

die() invokes later show_regs() -> show_regs_print_info() which prints the current preemption model.

Remove it from the initial line.

---
 arch/xtensa/kernel/traps.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/xtensa/kernel/traps.c +1 -5
index 38092d2..44c07c4 100644
@@ -629,15 +629,11 @@ DEFINE_SPINLOCK(die_lock);
 void __noreturn die(const char * str, struct pt_regs * regs, long err)
 {
 	static int die_counter;
-	const char *pr = "";
-
-	if (IS_ENABLED(CONFIG_PREEMPTION))
-		pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
 
 	console_verbose();
 	spin_lock_irq(&die_lock);
 
-	pr_info("%s: sig: %ld [#%d]%s\n", str, err, ++die_counter, pr);
+	pr_info("%s: sig: %ld [#%d]\n", str, err, ++die_counter);
 	show_regs(regs);
 	if (!user_mode(regs))
 		show_stack(NULL, (unsigned long *)regs->areg[1], KERN_INFO);
author maintainer
#25 lore raw

PATCH v4 9/9 tracing: Use preempt_model_str().

In reply to Sebastian Andrzej Siewior

Use preempt_model_str() instead of manually conducting the preemption model.

---
 kernel/trace/trace.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
kernel/trace/trace.c +1 -6
index 0e6d517e74e0f..fd3cb2b2ab829 100644
@@ -4100,12 +4100,7 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter)
 		   entries,
 		   total,
 		   buf->cpu,
-		   preempt_model_none()      ? "server" :
-		   preempt_model_voluntary() ? "desktop" :
-		   preempt_model_full()      ? "preempt" :
-		   preempt_model_lazy()	     ? "lazy"    :
-		   preempt_model_rt()        ? "preempt_rt" :
-		   "unknown",
+		   preempt_model_str(),
 		   /* These are reserved for later use */
 		   0, 0, 0, 0);
 #ifdef CONFIG_SMP
Signature · 1 line
2.47.2
#26 lore raw

[tip: sched/core] tracing: Use preempt_model_str()

The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     3bffa47a02636ed4134d558caecd35e92051e48d
Gitweb:        https://git.kernel.org/tip/3bffa47a02636ed4134d558caecd35e92051e48d
Author:        Sebastian Andrzej Siewior <[email protected]>
AuthorDate:    Fri, 14 Mar 2025 17:08:10 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Mon, 17 Mar 2025 11:23:41 +01:00

tracing: Use preempt_model_str()

Use preempt_model_str() instead of manually conducting the preemption model.

---
 kernel/trace/trace.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
kernel/trace/trace.c +1 -6
index 0e6d517..fd3cb2b 100644
@@ -4100,12 +4100,7 @@ print_trace_header(struct seq_file *m, struct trace_iterator *iter)
 		   entries,
 		   total,
 		   buf->cpu,
-		   preempt_model_none()      ? "server" :
-		   preempt_model_voluntary() ? "desktop" :
-		   preempt_model_full()      ? "preempt" :
-		   preempt_model_lazy()	     ? "lazy"    :
-		   preempt_model_rt()        ? "preempt_rt" :
-		   "unknown",
+		   preempt_model_str(),
 		   /* These are reserved for later use */
 		   0, 0, 0, 0);
 #ifdef CONFIG_SMP
#27 lore raw
In reply to Sebastian Andrzej Siewior
Quoted 10 lines · Sebastian Andrzej Siewior

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

A meta request: please do not put periods into patch titles in this and future series...

Thanks,

Ingo

author maintainer
#28 lore raw
Quoted 14 lines · Ingo Molnar
Quoted 10 lines · Sebastian Andrzej Siewior

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

Quoted 2 lines

A meta request: please do not put periods into patch titles in this and future series...

No full stop at the end of the sentence then? I've been asked once to do so.

Quoted 3 lines

Thanks,

Ingo

Sebastian