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:	Mon, 31 Jan 2011 16:53:30 +0100
From:	Tejun Heo <tj@...nel.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
	penberg@...nel.org, tglx@...utronix.de, rientjes@...gle.com,
	mingo@...e.hu, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/numa] x86: Unify cpu/apicid <-> NUMA node mapping
 between 32 and 64bit

Hello, Yinghai.

On Fri, Jan 28, 2011 at 12:33:00PM -0800, Yinghai Lu wrote:
> > +#ifdef CONFIG_NUMA
> > +extern int __cpuinit numa_cpu_node(int apicid);
> 
> cpu or apicid?

Should have been @cpu.  Will send a patch to update it.

> > +int __cpuinit numa_cpu_node(int cpu)
> > +{
> > +	int apicid = early_per_cpu(x86_cpu_to_apicid, cpu);
> > +
> > +	if (apicid != BAD_APICID)
> > +		return __apicid_to_node[apicid];
> > +	return NUMA_NO_NODE;
> > +}
> 
> it should be changed to cpu_to_node_via_apicid(), it could return
> not onlined node, aka node without memory.
> 
> So don't mess it up with cpu_to_node()

Hmmm... are you saying that the name is too confusing with
cpu_to_node() and should be renamed to cpu_to_node_via_apicid()?  In
that case, I agree but wish the name were something which represents
what it does as _via_apicid postfix doesn't really tell much.  Any
better idea?

Thanks.

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