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, 11 Mar 2011 17:03:55 +0100
From:	Tejun Heo <tj@...nel.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	David Rientjes <rientjes@...gle.com>, Ingo Molnar <mingo@...e.hu>,
	tglx@...utronix.de, "H. Peter Anvin" <hpa@...or.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH x86/mm] x86-64, NUMA: Don't call numa_set_distanc() for
 all possible node combinations during emulation

Hello, Yinghai.

On Fri, Mar 11, 2011 at 07:42:26AM -0800, Yinghai Lu wrote:
> > @@ -393,14 +398,10 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
> >  		if (emu_nid_to_phys[i] == NUMA_NO_NODE)
> >  			emu_nid_to_phys[i] = dfl_phys_nid;
> >  
> > -	/*
> > -	 * Transform distance table.  numa_set_distance() ignores all
> > -	 * out-of-bound distances.  Just call it for every possible node
> > -	 * combination.
> > -	 */
> > +	/* transform distance table */
> >  	numa_reset_distance();
> > -	for (i = 0; i < MAX_NUMNODES; i++) {
> > -		for (j = 0; j < MAX_NUMNODES; j++) {
> > +	for (i = 0; i < max_emu_nid + 1; i++) {
> > +		for (j = 0; j < max_emu_nid + 1; j++) {
> 
> using num_emu_nids would be better?

Well, this is mostly frivolous but I think max is better here.  We
don't really care about the number of emulated nodes.  The number
we're looking for is the number which allows the code to cover all
enabled configurations.  So, I think max reflects the logic better.

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