Skip to contentSkip to conversation

i386: print NUMA in oops messages

PATCH In review Chuck Ebbert 3 participants 3 messages Jun 6, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386: print NUMA in oops messages

Print "NUMA" in oops messages if it is configured, since it makes a big difference now that NUMA-aware code is common in the kernel. "SMP" could be removed since all NUMA machines are SMP, but it's probably better to be backwards-compatible.

---

Applies after previous patch that added stack size printout.

 arch/i386/kernel/traps.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
arch/i386/kernel/traps.c +9 -4
@@ -368,16 +368,21 @@ void die(const char * str, struct pt_reg
 		handle_BUG(regs);
 		printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
 		printk(KERN_EMERG "%dK_STACKS ", THREAD_SIZE / 1024);
+		printk(
 #ifdef CONFIG_PREEMPT
-		printk("PREEMPT ");
+			"PREEMPT "
 #endif
 #ifdef CONFIG_SMP
-		printk("SMP ");
+			"SMP "
+#endif
+#ifdef CONFIG_NUMA
+			"NUMA "
 #endif
 #ifdef CONFIG_DEBUG_PAGEALLOC
-		printk("DEBUG_PAGEALLOC");
+			"DEBUG_PAGEALLOC"
 #endif
-		printk("\n");
+			"\n");
+
 		if (notify_die(DIE_OOPS, str, regs, err,
 					current->thread.trap_no, SIGSEGV) !=
 				NOTIFY_STOP) {
Signature · 1 line
Chuck
#1 lore raw
Quoted 9 lines · On Mon, 5 Jun 2006 23:01:14 -0400 Chuck Ebbert <[email protected]>…
arch/i386/kernel/traps.c +4 -2
+		printk(
 #ifdef CONFIG_PREEMPT
-		printk("PREEMPT ");
+			"PREEMPT "
 #endif
 #ifdef CONFIG_SMP
-		printk("SMP ");
+			"SMP "
+#endif

arch/i386/kernel/traps.c void die(const char * str, struct pt_reg · line 385

Quoted 10 lines
arch/i386/kernel/traps.c +5 -2
+#ifdef CONFIG_NUMA
+			"NUMA "
 #endif
 #ifdef CONFIG_DEBUG_PAGEALLOC
-		printk("DEBUG_PAGEALLOC");
+			"DEBUG_PAGEALLOC"
 #endif
-		printk("\n");
+			"\n");
+

This is too cute for my taste. Keep it simple.

I suppose one could do something like

static const char config_string[] = ""

#ifdef CONFIG_SMP
	" SMP"
#endif
#ifdef CONFIG_NUMA
	" NUMA"

#endif
;

if one really feels so motivated...

#2 lore raw
Quoted 2 lines

This is too cute for my taste. Keep it simple.

why not just print the vermagic string then?
(and if needed, we should add NUMA to that)