public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Roland Dreier <rdreier@cisco.com>,
	Randy Dunlap <rdunlap@xenotime.net>, Tejun Heo <tj@kernel.org>,
	Andi Kleen <andi@firstfloor.org>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Yinghai Lu <yhlu.kernel@gmail.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	David Rientjes <rientjes@google.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
	Jack Steiner <steiner@sgi.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] x86: Limit the number of processor bootup messages
Date: Mon, 16 Nov 2009 13:34:12 -0800	[thread overview]
Message-ID: <4B01C554.8040201@sgi.com> (raw)
In-Reply-To: <20091116212216.GA2221@elte.hu>



Ingo Molnar wrote:
> * Mike Travis <travis@sgi.com> wrote:
> 
>> +	if (cpu == 0)
>> +		printk(KERN_INFO "CPU0: Thermal monitoring enabled (%s)\n",
>> +		       tm2 ? "TM2" : "TM1");
> 
> Hm, 'cpu==0 means boot cpu' assumptions are not particularly clean.

Yes.  It appears that boot_cpu_id is only defined for x86.  I don't know
any other way to identify the boot cpu.  (Hmm, in this case it *is* an
x86 specific function, so I'll change it.)

> 
>> +#ifdef CONFIG_NUMA
>> +	if (system_state == SYSTEM_BOOTING) {
>> +		static int current_node = -1;
>> +		int node = cpu_to_node(cpu);
>> +
>> +		if (node != current_node) {
>> +			if (current_node > (-1))
>> +				pr_cont(" Ok.\n");
>> +			current_node = node;
>> +			pr_info("Booting Node %3d, Processors ", node);
>> +		}
>> +		pr_cont(" #%d%s", cpu, cpu == (nr_cpu_ids - 1) ? " Ok.\n" : "");
>> +	} else
>> +#endif
>> +		pr_info("Booting Processor %d APIC 0x%x\n", cpu, apicid);
> 
> preprocessor directives cutting into if/else branches in an assymetric 
> way is being frowned upon. I'd also suggest to put this into a helper 
> inline.

ok.

> 
> Is the SYSTEM_BOOTING check there to not re-print this on CPU hotplug?

Actually you get the old style "Booting Processor" message for hotplug off/on.

newton:~ # cd /sys/devices/system/cpu
newton:/sys/devices/system/cpu # echo 0 > cpu6/online
[ 3037.593411] CPU 6 is now offline

newton:/sys/devices/system/cpu # echo 1 > cpu6/online
[ 3045.843469] Booting Processor 6 APIC 0x3

I can't test going into/out of the sleep modes, so it may be better to
summarize for those operations as well.

Thanks,
Mike


  reply	other threads:[~2009-11-16 21:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16 21:07 [PATCH 0/6] Limit console output by suppressing repetitious messages Mike Travis
2009-11-16 21:07 ` [PATCH 1/6] x86: Limit the number of processor bootup messages Mike Travis
2009-11-16 21:22   ` Ingo Molnar
2009-11-16 21:34     ` Mike Travis [this message]
2009-11-16 21:07 ` [PATCH 2/6] x86: Limit the number of per cpu MCE " Mike Travis
2009-11-16 21:22   ` Ingo Molnar
2009-11-16 21:35     ` Mike Travis
2009-11-17  7:10       ` Hidetoshi Seto
2009-11-17 17:16         ` Mike Travis
2009-11-17 18:40         ` [PATCH] x86, mce: rework output of MCE banks ownership information Mike Travis
2009-12-14 21:46           ` Mike Travis
2009-12-15  1:50             ` Hidetoshi Seto
2009-11-16 21:07 ` [PATCH 3/6] INIT: Limit the number of per cpu calibration bootup messages Mike Travis
2009-11-16 21:24   ` Ingo Molnar
2009-11-16 21:27     ` H. Peter Anvin
2009-11-16 21:43       ` Cyrill Gorcunov
2009-11-16 21:46         ` H. Peter Anvin
2009-11-16 21:50           ` Cyrill Gorcunov
2009-11-17  3:09             ` David Miller
2009-11-17 15:59               ` Cyrill Gorcunov
2009-11-17 16:29                 ` David Miller
2009-11-17 17:42                   ` Cyrill Gorcunov
2009-11-17 17:49                     ` Mike Travis
2009-11-17 17:54                       ` H. Peter Anvin
2009-11-17 17:59                       ` Cyrill Gorcunov
2009-11-17 16:51               ` Mike Travis
2009-11-16 21:45     ` Mike Travis
2009-11-16 21:48       ` H. Peter Anvin
2009-11-16 22:51         ` Mike Travis
2009-11-16 22:55           ` H. Peter Anvin
2009-11-16 21:07 ` [PATCH 4/6] firmware: Limit the number of per cpu firmware messages during bootup Mike Travis
2009-11-16 21:07 ` [PATCH 5/6] sched: Limit the number of scheduler debug messages Mike Travis
2009-11-16 21:07 ` [PATCH 6/6] x86: Limit number of per cpu TSC sync messages Mike Travis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B01C554.8040201@sgi.com \
    --to=travis@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@suse.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rdreier@cisco.com \
    --cc=rdunlap@xenotime.net \
    --cc=rientjes@google.com \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=steiner@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=x86@kernel.org \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox