All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: get the probable node ID from the first CPU of the mask
Date: Wed, 23 Jul 2014 11:10:06 -0400	[thread overview]
Message-ID: <20140723151006.GC7103@htj.dyndns.org> (raw)
In-Reply-To: <53CF0F46.8000508@cn.fujitsu.com>

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

      reply	other threads:[~2014-07-23 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22  5:04 [PATCH] workqueue: get the probable node ID from the first CPU of the mask Lai Jiangshan
2014-07-22 15:30 ` Tejun Heo
2014-07-23  1:26   ` Lai Jiangshan
2014-07-23 15:10     ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140723151006.GC7103@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.