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

From: Tejun Heo
Date: Wed Apr 01 2015 - 11:52:24 EST

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 & @U).
> It is bad, the pwq is NOT controlled by @L nor @U now.
> I think we may use @U for the dfl_pwq in this case. But it will introduces
> a problem:
> When (@L & @U) has online cpu, the dfl_pwq's cpumaks is (@L & @U).
> when (@L & @U) has no online cpu, the dfl_pwq's cpumask is @U.
> It means dfl_pwq may need to be reallocated during the cpuhotplug-add/remove
> and it means wq_update_unbound_numa() can fail.
> Frederic, TJ, any comments about this case?
> TJ, would you like to make wq_update_unbound_numa() be failure-able?

The goal is making @L behave as cpu_possible_mask for workqueues,
right? If @L & @U is empty, fallback to @L. If @L & @O is empty,
leave it to the scheduler.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at