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] [day] [month] [year] [list]
Message-ID: <20140723151006.GC7103@htj.dyndns.org>
Date:	Wed, 23 Jul 2014 11:10:06 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] workqueue: get the probable node ID from the first CPU
 of the mask

On Wed, Jul 23, 2014 at 09:26:30AM +0800, Lai Jiangshan wrote:
> On 07/22/2014 11:30 PM, Tejun Heo wrote:
> > On Tue, Jul 22, 2014 at 01:04:02PM +0800, Lai Jiangshan wrote:
> >> +		node = cpu_to_node(cpumask_first(pool->attrs->cpumask));
> > 
> > Minor but maybe cpumask_any() is a better fit here?
> > 
> 
> It is OK, the result are the same. But I still think cpumask_first() is better since
> its name sounds deterministic while we need a deterministic value for pool->node.

The CPU can be any CPU in the mask.  That's the whole point of
cpumask_any().  Please use it.

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