quite down SMP boot messages
PATCH 1/1 quite down SMP boot messages
Hi,
I'd like to propose this patch for 2.6.0 or 2.6.1 to quite down some of the excessive boot messages printed for each CPU. The patch simply introduces a boot time variable 'smpverbose' which users can set if they experience problems and want to see the full set of messages.
Once you hit > 2 CPUs the amount of noise printed per CPU starts becoming a pain, at 64 CPUs it's turning into a royal pain ....
Oh and I also killed a NULL initializer in kernel/cpu.c - bad Rusty ;-)
Thanks,
Jes
arch/ia64/kernel/setup.c renamed from linux-2.6.0-test11-ia64/arch/ia64/kernel/setup.c +6 -2
@@ -58,6 +58,8 @@unsigned long __per_cpu_offset[NR_CPUS ];#endif +extern int smp_verbose; + DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8);
@@ -516,8 +518,10 @@ impl_va_msb = vm2.pal_vm_info_2_s.impl_va_msb; phys_addr_size = vm1.pal_vm_info_1_s.phys_add_size; } -printk (KERN_INFO "CPU %d: %lu virtual and %lu physical address bits\n" , -smp_processor_id (), impl_va_msb +1 , phys_addr_size); +if (smp_verbose) +printk (KERN_INFO "CPU %d: %lu virtual and %lu physical " +"address bits\n" ,smp_processor_id (), + impl_va_msb +1 , phys_addr_size); c->unimpl_va_mask = ~((7L <<61 ) | ((1L << (impl_va_msb +1 )) -1 )); c->unimpl_pa_mask = ~((1L <<63 ) | ((1L << phys_addr_size) -1 )); }
arch/ia64/kernel/smpboot.c renamed from linux-2.6.0-test11-ia64/arch/ia64/kernel/smpboot.c +9 -3
@@ -58,6 +58,8 @@#endif +extern int smp_verbose; +/* * ITC synchronization related stuff: */
@@ -403,7 +405,8 @@if (cpu_isset (cpu, cpu_callin_map)) {/* number CPUs logically, starting from 1 (BSP is 0) */ -printk (KERN_INFO "CPU%d: CPU has booted.\n" , cpu); +if (smp_verbose) +printk (KERN_INFO "CPU %d: CPU has booted.\n" , cpu); }else {printk (KERN_ERR "Processor 0x%x/0x%x is stuck.\n" , cpu, sapicid); ia64_cpu_to_sapicid[cpu] =-1 ;
@@ -578,14 +581,17 @@if (sapicid ==-1 )return -EINVAL ; -printk (KERN_INFO "Processor %d/%d is spinning up...\n" , sapicid, cpu); +if (smp_verbose) +printk (KERN_INFO "Processor %d/%d is spinning up...\n" , + sapicid, cpu);/* Processor goes to start_secondary(), sets online flag */ ret =do_boot_cpu (sapicid, cpu);if (ret <0 )return ret; -printk (KERN_INFO "Processor %d has spun up...\n" , cpu); +if (smp_verbose) +printk (KERN_INFO "Processor %d has spun up...\n" , cpu);return 0 ; }
arch/ia64/sn/kernel/setup.c renamed from linux-2.6.0-test11-ia64/arch/ia64/sn/kernel/setup.c +5 -2
@@ -48,6 +48,8 @@#include <asm/sn/sn_sal.h> #include <asm/sn/sn2/shub.h> +extern int smp_verbose; + DEFINE_PER_CPU(struct pda_s, pda_percpu);#define pxm_to_nasid (pxm) (((pxm)<<1) | (get_nasid() & ~0x1ff))
@@ -386,8 +388,9 @@ cnode =nasid_to_cnodeid (nasid); slice =cpu_physical_id_to_slice (cpuphyid); -printk ("CPU %d: nasid %d, slice %d, cnode %d\n" , -smp_processor_id (), nasid, slice, cnode); +if (smp_verbose) +printk ("CPU %d: nasid %d, slice %d, cnode %d\n" , +smp_processor_id (), nasid, slice, cnode);memset (pda,0 ,sizeof (pda)); pda->p_nodepda = nodepdaindr[cnode];
init/main.c renamed from linux-2.6.0-test11-ia64/init/main.c +15 -2
@@ -118,6 +118,9 @@/* Setup configured maximum number of CPUs to activate */ static unsigned int max_cpus =NR_CPUS ; +/* Default to quiet boots, this can be overridden by the user */ +int smp_verbose; +/* * Setup routine for controlling SMP activation *
@@ -144,6 +147,14 @@__setup ("maxcpus=" , maxcpus); +static int __init smpverbose (char *str) +{ + smp_verbose =1 ; +return 1 ; +} + +__setup ("smpverbose" , smpverbose); +static char * argv_init[MAX_INIT_ARGS +2 ] = {"init" ,NULL , };char * envp_init[MAX_INIT_ENVS +2 ] = {"HOME=/" ,"TERM=linux" ,NULL , };
@@ -369,13 +380,15 @@if (num_online_cpus () >= max_cpus)break ;if (cpu_possible (i) && !cpu_online (i)) { -printk ("Bringing up %i\n" , i); +if (smp_verbose) +printk ("Bringing up %i\n" , i);cpu_up (i); } }/* Any cleanup work */ -printk ("CPUS done %u\n" , max_cpus); +if (smp_verbose) +printk ("CPUS done %u\n" , max_cpus);smp_cpus_done (max_cpus);#if 0 /* Get other processors into their bootup holding patterns. */
kernel/cpu.c renamed from linux-2.6.0-test11-ia64/kernel/cpu.c +5 -2
@@ -14,7 +14,9 @@/* This protects CPUs going up and down... */ DECLARE_MUTEX (cpucontrol); -static struct notifier_block *cpu_chain =NULL ; +static struct notifier_block *cpu_chain; + +extern int smp_verbose;/* Need to know about CPUs going up/down? */ int register_cpu_notifier (struct notifier_block *nb)
@@ -55,7 +57,8 @@BUG ();/* Now call notifier in preparation. */ -printk ("CPU %u IS NOW UP!\n" , cpu); +if (smp_verbose) +printk ("CPU %u IS NOW UP!\n" , cpu);notifier_call_chain (&cpu_chain,CPU_ONLINE , hcpu); out_notify:
Re: [patch] quiet down SMP boot messages
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jes" == Jes Sorensen <[email protected]> writes:
Jes> Hi, I'd like to propose this patch for 2.6.0 or 2.6.1 to quiet Jes> down some of the excessive boot messages printed for each Jes> CPU. The patch simply introduces a boot time variable Jes> 'smpverbose' which users can set if they experience problems and Jes> want to see the full set of messages.
Hi,
Here is an improved version. Andi suggested that I move the smp_verbose prototype to include/linux/smp.h and I also nailed another NULL initializer in init/main.c
Oh and I fixed my b0rked spelling as well - time to look at the screen when typing ;-)
Cheers,
Jes
arch/ia64/kernel/setup.c renamed from linux-2.6.0-test11-ia64/arch/ia64/kernel/setup.c +4 -2
@@ -516,8 +516,10 @@ impl_va_msb = vm2.pal_vm_info_2_s.impl_va_msb; phys_addr_size = vm1.pal_vm_info_1_s.phys_add_size; } -printk (KERN_INFO "CPU %d: %lu virtual and %lu physical address bits\n" , -smp_processor_id (), impl_va_msb +1 , phys_addr_size); +if (smp_verbose) +printk (KERN_INFO "CPU %d: %lu virtual and %lu physical " +"address bits\n" ,smp_processor_id (), + impl_va_msb +1 , phys_addr_size); c->unimpl_va_mask = ~((7L <<61 ) | ((1L << (impl_va_msb +1 )) -1 )); c->unimpl_pa_mask = ~((1L <<63 ) | ((1L << phys_addr_size) -1 )); }
arch/ia64/kernel/smpboot.c renamed from linux-2.6.0-test11-ia64/arch/ia64/kernel/smpboot.c +7 -3
@@ -403,7 +403,8 @@if (cpu_isset (cpu, cpu_callin_map)) {/* number CPUs logically, starting from 1 (BSP is 0) */ -printk (KERN_INFO "CPU%d: CPU has booted.\n" , cpu); +if (smp_verbose) +printk (KERN_INFO "CPU %d: CPU has booted.\n" , cpu); }else {printk (KERN_ERR "Processor 0x%x/0x%x is stuck.\n" , cpu, sapicid); ia64_cpu_to_sapicid[cpu] =-1 ;
@@ -578,14 +579,17 @@if (sapicid ==-1 )return -EINVAL ; -printk (KERN_INFO "Processor %d/%d is spinning up...\n" , sapicid, cpu); +if (smp_verbose) +printk (KERN_INFO "Processor %d/%d is spinning up...\n" , + sapicid, cpu);/* Processor goes to start_secondary(), sets online flag */ ret =do_boot_cpu (sapicid, cpu);if (ret <0 )return ret; -printk (KERN_INFO "Processor %d has spun up...\n" , cpu); +if (smp_verbose) +printk (KERN_INFO "Processor %d has spun up...\n" , cpu);return 0 ; }
arch/ia64/sn/kernel/setup.c renamed from linux-2.6.0-test11-ia64/arch/ia64/sn/kernel/setup.c +3 -2
@@ -386,8 +386,9 @@ cnode =nasid_to_cnodeid (nasid); slice =cpu_physical_id_to_slice (cpuphyid); -printk ("CPU %d: nasid %d, slice %d, cnode %d\n" , -smp_processor_id (), nasid, slice, cnode); +if (smp_verbose) +printk ("CPU %d: nasid %d, slice %d, cnode %d\n" , +smp_processor_id (), nasid, slice, cnode);memset (pda,0 ,sizeof (pda)); pda->p_nodepda = nodepdaindr[cnode];
include/linux/smp.h renamed from linux-2.6.0-test11-ia64/include/linux/smp.h +4 -0
@@ -90,6 +90,8 @@*/ void smp_prepare_boot_cpu (void ); +extern int smp_verbose; +#else /* !SMP */ /*
@@ -106,6 +108,8 @@#define cpu_possible (cpu) ({ BUG_ON((cpu) != 0); 1; })#define smp_prepare_boot_cpu () do {} while (0) +#define smp_verbose 0 +#endif /* !SMP */ #define get_cpu () ({ preempt_disable(); smp_processor_id(); })
init/main.c renamed from linux-2.6.0-test11-ia64/init/main.c +17 -3
@@ -108,7 +108,7 @@extern void time_init (void );/* Default late time init is NULL. archs can override this later. */ -void (*late_time_init)(void ) =NULL ; +void (*late_time_init)(void );extern void softirq_init (void );int rows, cols;
@@ -144,6 +144,18 @@__setup ("maxcpus=" , maxcpus); +#ifdef CONFIG_SMP +/* Default to quiet boots, this can be overridden by the user */ +int smp_verbose; +static int __init smpverbose (char *str) +{ + smp_verbose =1 ; +return 1 ; +} + +__setup ("smpverbose" , smpverbose); +#endif +static char * argv_init[MAX_INIT_ARGS +2 ] = {"init" ,NULL , };char * envp_init[MAX_INIT_ENVS +2 ] = {"HOME=/" ,"TERM=linux" ,NULL , };
@@ -369,13 +381,15 @@if (num_online_cpus () >= max_cpus)break ;if (cpu_possible (i) && !cpu_online (i)) { -printk ("Bringing up %i\n" , i); +if (smp_verbose) +printk ("Bringing up %i\n" , i);cpu_up (i); } }/* Any cleanup work */ -printk ("CPUS done %u\n" , max_cpus); +if (smp_verbose) +printk ("CPUS done %u\n" , max_cpus);smp_cpus_done (max_cpus);#if 0 /* Get other processors into their bootup holding patterns. */
kernel/cpu.c renamed from linux-2.6.0-test11-ia64/kernel/cpu.c +3 -2
@@ -14,7 +14,7 @@/* This protects CPUs going up and down... */ DECLARE_MUTEX (cpucontrol); -static struct notifier_block *cpu_chain =NULL ; +static struct notifier_block *cpu_chain;/* Need to know about CPUs going up/down? */ int register_cpu_notifier (struct notifier_block *nb)
@@ -55,7 +55,8 @@BUG ();/* Now call notifier in preparation. */ -printk ("CPU %u IS NOW UP!\n" , cpu); +if (smp_verbose) +printk ("CPU %u IS NOW UP!\n" , cpu);notifier_call_chain (&cpu_chain,CPU_ONLINE , hcpu); out_notify:
Quoted 11 lines · Jes Sorensen
Hi,
I'd like to propose this patch for 2.6.0 or 2.6.1 to quite down some of the excessive boot messages printed for each CPU. The patch simply introduces a boot time variable 'smpverbose' which users can set if they experience problems and want to see the full set of messages.
Once you hit > 2 CPUs the amount of noise printed per CPU starts becoming a pain, at 64 CPUs it's turning into a royal pain ....
Oh and I also killed a NULL initializer in
kernel/cpu.c- bad Rusty ;-)
Just kill the silly option, these messages are completly useless. And IIRC we didn't have them in 2.4 either..
In message <[email protected]> you write:
Quoted 6 lines · Jes Sorensen
Quoted 2 lines
Once you hit > 2 CPUs the amount of noise printed per CPU starts becoming a pain, at 64 CPUs it's turning into a royal pain ....
Just kill the silly option, these messages are completly useless. And IIRC we didn't have them in 2.4 either..
Agreed. We got v. chatty during 2.5. In 2.6.<smallnum> we should drop a lot of boot crud.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Christoph" == Christoph Hellwig <[email protected]> writes:
Christoph> On Thu, Dec 11, 2003 at 08:30:52AM -0500, Jes Sorensen
Quoted 5 lines · Christoph> wrote:
Quoted 5 lines
Once you hit > 2 CPUs the amount of noise printed per CPU starts becoming a pain, at 64 CPUs it's turning into a royal pain ....
Oh and I also killed a NULL initializer in
kernel/cpu.c- bad Rusty ;-)
Christoph> Just kill the silly option, these messages are completly Christoph> useless. And IIRC we didn't have them in 2.4 either..
Some of them I agree could just be killed while others still have some use. Thats why I suggest leaving in the boot option.
Jes
Hi!
Quoted 7 lines
I'd like to propose this patch for 2.6.0 or 2.6.1 to quite down some of the excessive boot messages printed for each CPU. The patch simply introduces a boot time variable 'smpverbose' which users can set if they experience problems and want to see the full set of messages.
Once you hit > 2 CPUs the amount of noise printed per CPU starts becoming a pain, at 64 CPUs it's turning into a royal pain ....
You might want to be more creative.. With something like < for each cpu going up and > for each cpu booted, you might be able to preserve all the info yet make it _way_ shorter.
Pavel
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line · Pavel Machek
I'd like to propose this patch for 2.6.0 or 2.6.1 to quite down some of the excessive boot messages printed for each CPU. The patch simply introduces a boot time variable 'smpverbose' which users can set if they experience problems and want to see the full set of messages.
Once you hit > 2 CPUs the amount of noise printed per CPU starts becoming a pain, at 64 CPUs it's turning into a royal pain ....
Pavel> You might want to be more creative.. With something like < for each Pavel> cpu going up and > for each cpu booted, you might be able to preserve Pavel> all the info yet make it _way_ shorter.
Sounds promising to me. I also dislike the verbosity, but getting rid of the messages completely makes me nervous, too, because sometimes things do fail and then it's invaluable to have some idea of how far the boot got (even if the person booting the machines has no clue what the funny symbols on his screen actually mean).
--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"David" == David Mosberger <[email protected]> writes:
David> Sounds promising to me. I also dislike the verbosity, but David> getting rid of the messages completely makes me nervous, too, David> because sometimes things do fail and then it's invaluable to David> have some idea of how far the boot got (even if the person David> booting the machines has no clue what the funny symbols on his David> screen actually mean).
This is exactly why I added the smpverbose boot option so one can reenable all the messages.
Cheers,
Jes