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]
Date:	Tue, 07 Dec 2010 15:20:04 +0100
From:	Tejun Heo <tj@...nel.org>
To:	Christoph Lameter <cl@...ux.com>
CC:	akpm@...ux-foundation.org, Yinghai Lu <yinghai@...nel.org>,
	Ingo Molnar <mingo@...e.hu>,
	Pekka Enberg <penberg@...helsinki.fi>,
	linux-kernel@...r.kernel.org,
	Eric Dumazet <eric.dumazet@...il.com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [Use cpuops V1 04/11] x86: Use this_cpu_ops for current_cpu_data
 accesses

On 12/07/2010 03:17 PM, Tejun Heo wrote:
> On 12/06/2010 06:16 PM, Christoph Lameter wrote:
>> Current_cpu_data accesses are per cpu accesses. We can also use
>> this_cpu_ops if a scalar is retrieved.
>>
>> Cc: Yinghai Lu <yinghai@...nel.org>
>> Cc: Ingo Molnar <mingo@...e.hu>
>> Signed-off-by: Christoph Lameter <cl@...ux.com>
>>
>> ---
>>  arch/x86/kernel/cpu/cpufreq/powernow-k8.c |    2 +-
>>  arch/x86/kernel/cpu/intel_cacheinfo.c     |    4 ++--
>>  arch/x86/kernel/smpboot.c                 |   10 +++++-----
>>  3 files changed, 8 insertions(+), 8 deletions(-)
>>
>> Index: linux-2.6/arch/x86/kernel/smpboot.c
>> ===================================================================
>> --- linux-2.6.orig/arch/x86/kernel/smpboot.c	2010-11-30 11:53:03.000000000 -0600
>> +++ linux-2.6/arch/x86/kernel/smpboot.c	2010-11-30 11:57:02.000000000 -0600
>> @@ -430,7 +430,7 @@ void __cpuinit set_cpu_sibling_map(int c
>>  
>>  	cpumask_set_cpu(cpu, c->llc_shared_map);
>>  
>> -	if (current_cpu_data.x86_max_cores == 1) {
>> +	if (__this_cpu_read(cpu_info.x86_max_cores) == 1) {
>>  		cpumask_copy(cpu_core_mask(cpu), cpu_sibling_mask(cpu));
>>  		c->booted_cores = 1;
>>  		return;
>> @@ -1377,7 +1377,7 @@ void play_dead_common(void)
>>  
>>  	mb();
>>  	/* Ack it */
>> -	__get_cpu_var(cpu_state) = CPU_DEAD;
>> +	__this_cpu_write(cpu_state, CPU_DEAD);
> 
> This belongs to the previous patch, right?  I'll move it over and
> apply 03 and 04.  I think routing these through percpu is okay but if
> anyone wants these to go through x86, scream.

Ooh, was too fast.  I think mixing the use of percpu accesses to
cpu_info and the wrapper macro current_cpu_data is quite confusing.
There aren't too many current_cpu_data users in x86 anyway.  Can you
please make the conversion complete?  I'm moving the above misplaced
chunk into 03 and not applying 04 for now.

Thank you.

-- 
tejun
--
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