Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1677181 > unrolled thread

Re: [PATCH] workqueue: Ensure that cpumask set for pools created after boot

Started byMichael Bringmann <mwb@linux.vnet.ibm.com>
First post2017-06-28 23:20 +0200
Last post2017-06-28 23:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] workqueue: Ensure that cpumask set for pools created  after boot Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-06-28 23:20 +0200
    Re: [PATCH] workqueue: Ensure that cpumask set for pools created  after boot Tejun Heo <tj@kernel.org> - 2017-06-28 23:30 +0200

#1677181 — Re: [PATCH] workqueue: Ensure that cpumask set for pools created after boot

FromMichael Bringmann <mwb@linux.vnet.ibm.com>
Date2017-06-28 23:20 +0200
SubjectRe: [PATCH] workqueue: Ensure that cpumask set for pools created after boot
Message-ID<tXsxr-2Do-7@gated-at.bofh.it>
I will try that patch tomorrow.  My only concern about that is the use of WARN_ON().
As I may have mentioned in my note of 6/27, I saw about 600 instances of the warning
message just during boot of the PowerPC kernel.  I doubt that we want to see that on
an ongoing basis.

Michael

On 06/13/2017 03:10 PM, Tejun Heo wrote:
> Hello,
> 
> On Tue, Jun 13, 2017 at 03:04:30PM -0500, Michael Bringmann wrote:
>> @@ -3564,19 +3564,28 @@ static struct pool_workqueue *alloc_unbound_pwq(struct workqueue_struct *wq,
>>  static bool wq_calc_node_cpumask(const struct workqueue_attrs *attrs, int node,
>>  				 int cpu_going_down, cpumask_t *cpumask)
>>  {
>> +	cpumask_t	onl_targ_cm;
>> +
>>  	if (!wq_numa_enabled || attrs->no_numa)
>>  		goto use_dfl;
>>  
>>  	/* does @node have any online CPUs @attrs wants? */
>> -	cpumask_and(cpumask, cpumask_of_node(node), attrs->cpumask);
>> +	cpumask_and(&onl_targ_cm, cpumask_of_node(node), attrs->cpumask);
>>  	if (cpu_going_down >= 0)
>> -		cpumask_clear_cpu(cpu_going_down, cpumask);
>> +		cpumask_clear_cpu(cpu_going_down, &onl_targ_cm);
>>  
>> -	if (cpumask_empty(cpumask))
>> +	if (cpumask_empty(&onl_targ_cm))
>>  		goto use_dfl;
>>  
>>  	/* yeap, return possible CPUs in @node that @attrs wants */
>>  	cpumask_and(cpumask, attrs->cpumask, wq_numa_possible_cpumask[node]);
>> +
>> +	if (cpumask_weight(&onl_targ_cm) > cpumask_weight(cpumask)) {
>> +		printk(KERN_INFO "WARNING: WQ cpumask: onl intersect > "
>> +						"possible intersect\n");
>> +		return false;
>> +	}
> 
> Yeah, alternatively, we can just add right before returning,
> 
> 	if (WARN_ON(cpumask_empty(cpumask)))
> 		return false;
> 
> Thanks.
> 

-- 
Michael W. Bringmann
Linux Technology Center
IBM Corporation
Tie-Line  363-5196
External: (512) 286-5196
Cell:       (512) 466-0650
mwb@linux.vnet.ibm.com

[toc] | [next] | [standalone]


#1677187

FromTejun Heo <tj@kernel.org>
Date2017-06-28 23:30 +0200
Message-ID<tXsH8-rB-15@gated-at.bofh.it>
In reply to#1677181
On Wed, Jun 28, 2017 at 04:15:09PM -0500, Michael Bringmann wrote:
> I will try that patch tomorrow.  My only concern about that is the use of WARN_ON().
> As I may have mentioned in my note of 6/27, I saw about 600 instances of the warning
> message just during boot of the PowerPC kernel.  I doubt that we want to see that on
> an ongoing basis.

Yeah, we can either do pr_err_once() or WARN_ON_ONCE(), so that we
don't print that out constantly.

Thanks.

-- 
tejun

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web