Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-01 Thread Tejun Heo
On Wed, Apr 01, 2015 at 04:33:30PM +0800, Lai Jiangshan wrote: > The missing case: > (@L & @U) is not empty but (@L & @U @O) is empty. > > In my old code (V5 patchset), the dfl_pwq uses (@L & @U), the scheduler will > use cpu_possible_mask instead due to there is no cpu onlined among all cpu in

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-01 Thread Lai Jiangshan
Hi, Frederic, TJ I considered a special case and forgot to consider an another case. Let @L = the low level unbound workqueue cpumask. Let @U = the user setting cpumask (wq->unbound_attrs->cpumask). Thus the pwqs in the specified wq are controlled by @L & @U (& = cpmask_and()). But the

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-01 Thread Lai Jiangshan
Hi, Frederic, TJ I considered a special case and forgot to consider an another case. Let @L = the low level unbound workqueue cpumask. Let @U = the user setting cpumask (wq-unbound_attrs-cpumask). Thus the pwqs in the specified wq are controlled by @L @U ( = cpmask_and()). But the

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-04-01 Thread Tejun Heo
On Wed, Apr 01, 2015 at 04:33:30PM +0800, Lai Jiangshan wrote: The missing case: (@L @U) is not empty but (@L @U @O) is empty. In my old code (V5 patchset), the dfl_pwq uses (@L @U), the scheduler will use cpu_possible_mask instead due to there is no cpu onlined among all cpu in (@L

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-31 Thread Lai Jiangshan
On 03/25/2015 01:31 AM, Tejun Heo wrote: > On Wed, Mar 18, 2015 at 12:40:17PM +0800, Lai Jiangshan wrote: >> The oreder-workquue is ignore from the low level unbound workqueue cpumask, >> it will be handled in near future. > > Ugh, right, ordered workqueues are tricky. Maybe we should change how

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-31 Thread Lai Jiangshan
On 03/25/2015 01:31 AM, Tejun Heo wrote: On Wed, Mar 18, 2015 at 12:40:17PM +0800, Lai Jiangshan wrote: The oreder-workquue is ignore from the low level unbound workqueue cpumask, it will be handled in near future. Ugh, right, ordered workqueues are tricky. Maybe we should change how

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-24 Thread Tejun Heo
On Wed, Mar 18, 2015 at 12:40:17PM +0800, Lai Jiangshan wrote: > The oreder-workquue is ignore from the low level unbound workqueue cpumask, > it will be handled in near future. Ugh, right, ordered workqueues are tricky. Maybe we should change how ordered workqueues are implemented. Just gate

Re: [PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-24 Thread Tejun Heo
On Wed, Mar 18, 2015 at 12:40:17PM +0800, Lai Jiangshan wrote: The oreder-workquue is ignore from the low level unbound workqueue cpumask, it will be handled in near future. Ugh, right, ordered workqueues are tricky. Maybe we should change how ordered workqueues are implemented. Just gate

[PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-17 Thread Lai Jiangshan
Allow to modify the low-level unbound workqueues cpumask through sysfs. This is performed by traversing the entire workqueue list and calling wq_unbound_install_ctx_prepare() on the unbound workqueues with the low level mask passed in. Only after all the preparation are done, we commit them all

[PATCH 4/4 V5] workqueue: Allow modifying low level unbound workqueue cpumask

2015-03-17 Thread Lai Jiangshan
Allow to modify the low-level unbound workqueues cpumask through sysfs. This is performed by traversing the entire workqueue list and calling wq_unbound_install_ctx_prepare() on the unbound workqueues with the low level mask passed in. Only after all the preparation are done, we commit them all