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:	Sat, 28 May 2011 01:38:34 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jack Steiner <steiner@....com>,
	Lee Schermerhorn <lee.schermerhorn@...com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Paul Menage <menage@...gle.com>, Robin Holt <holt@....com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-mm@...ck.org
Subject: Re: [PATCH v2] cpusets: randomize node rotor used in
 cpuset_mem_spread_node()

On Fri 27-05-11 16:30:33, David Rientjes wrote:
> On Sat, 28 May 2011, Michal Hocko wrote:
> 
> > > --- a/include/linux/nodemask.h~cpusets-randomize-node-rotor-used-in-cpuset_mem_spread_node-fix-2
> > > +++ a/include/linux/nodemask.h
> > > @@ -433,8 +433,6 @@ static inline void node_set_offline(int 
> > >  	nr_online_nodes = num_node_state(N_ONLINE);
> > >  }
> > >  
> > > -extern int node_random(const nodemask_t *maskp);
> > > -
> > >  #else
> > >  
> > >  static inline int node_state(int node, enum node_states state)
> > > @@ -466,7 +464,15 @@ static inline int num_node_state(enum no
> > >  #define node_set_online(node)	   node_set_state((node), N_ONLINE)
> > >  #define node_set_offline(node)	   node_clear_state((node), N_ONLINE)
> > >  
> > > -static inline int node_random(const nodemask_t *mask) { return 0; }
> > > +#endif
> > > +
> > > +#if defined(CONFIG_NUMA) && (MAX_NUMNODES > 1)
> > > +extern int node_random(const nodemask_t *maskp);
> > > +#else
> > > +static inline int node_random(const nodemask_t *mask)
> > > +{
> > > +	return 0;
> > > +}
> > >  #endif
> > 
> > I have to admit that I quite don't understand concept of several nodes
> > with UMA archs but do we really want to provide the sane node all the
> > time?
> > 
> 
> They aren't nodes on UMA machines, they are memory regions for 
> DISCONTIGMEM which are separated by large holes in the address space.  
> These archs will never sanely use node_random(), so it doesn't really 
> matter except for CONFIG_NUMA where MAX_NUMNODES > 1, since they won't be 
> selecting random memory regions.

OK, I see. Then it makes much more sense. Thanks for clarification.

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
--
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