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:	Fri, 21 May 2010 17:12:25 +0800
From:	minskey guo <chaohong_guo@...ux.intel.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
CC:	Stephen Rothwell <sfr@...b.auug.org.au>,
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	prarit@...hat.com, andi.kleen@...el.com,
	linux-kernel@...r.kernel.org, minskey guo <chaohong.guo@...el.com>,
	Tejun Heo <tj@...nel.org>, stable@...nel.org
Subject: Re: [PATCH] online CPU before memory failed in pcpu_alloc_pages()

On 05/21/2010 04:39 PM, KAMEZAWA Hiroyuki wrote:
> On Fri, 21 May 2010 16:22:19 +0800
> minskey guo<chaohong_guo@...ux.intel.com>  wrote:
>
>> Yes.  I can use cpu_to_mem().  only some little difference during
>> CPU online:  1st cpu within memoryless node gets memory from current
>> node or the node to which the cpu0 belongs,
>>
>>
>> But I have a question about the patch:
>>
>>      numa-slab-use-numa_mem_id-for-slab-local-memory-node.patch,
>>
>>
>>
>>
>> @@ -2968,9 +2991,23 @@ static int __build_all_zonelists(void *d
>> ...
>>
>> -	for_each_possible_cpu(cpu)
>> +	for_each_possible_cpu(cpu) {
>> 		setup_pageset(&per_cpu(boot_pageset, cpu), 0);
>> ...
>>
>> +#ifdef CONFIG_HAVE_MEMORYLESS_NODES
>> + 	if (cpu_online(cpu))
>> +		cpu_to_mem(cpu) = local_memory_node(cpu_to_node(cpu));
>> +#endif

Look at the above code,  int __build_all_zonelists(),  cpu_to_mem(cpu)
is set only when cpu is onlined.  Suppose that a node with local memory,
all memory segments are onlined first, and then,  cpus within that node
are onlined one by one,  in this case,  where does the cpu_to_mem(cpu)
for the last cpu get its value ?


>
> So, cpu_to_node(cpu) for possible cpus will have NUMA_NO_NODE(-1)
> or the number of the nearest node.
>
> IIUC, if SRAT is not broken, all pxm has its own node_id.

Thank you very much for the info,  I have been thinking why node_id
is (-1) in some cases.


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