lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B01C554.8040201@sgi.com>
Date:	Mon, 16 Nov 2009 13:34:12 -0800
From:	Mike Travis <travis@....com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Roland Dreier <rdreier@...co.com>,
	Randy Dunlap <rdunlap@...otime.net>, Tejun Heo <tj@...nel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Yinghai Lu <yhlu.kernel@...il.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	David Rientjes <rientjes@...gle.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>,
	Jack Steiner <steiner@....com>,
	Frederic Weisbecker <fweisbec@...il.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] x86: Limit the number of processor bootup messages



Ingo Molnar wrote:
> * Mike Travis <travis@....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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ