Re: [PATCH] workqueue: get the probable node ID from the first CPU of the mask

2014-07-23 Thread Tejun Heo
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 fi

Re: [PATCH] workqueue: get the probable node ID from the first CPU of the mask

2014-07-22 Thread Lai Jiangshan
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 cpumas

Re: [PATCH] workqueue: get the probable node ID from the first CPU of the mask

2014-07-22 Thread Tejun Heo
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? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

[PATCH] workqueue: get the probable node ID from the first CPU of the mask

2014-07-21 Thread Lai Jiangshan
Current get_unbound_pool() considers all node IDs are probable for the pool, and it travel all nodes to find the node ID for the pool. This travel is unnecessary, the probable node ID can be attained from the first CPU and we need check only one possible node ID. Signed-off-by: Lai Jiangshan ---