On Wed, Jan 13, 2021 at 12:36:55AM +0800, Lai Jiangshan wrote:
> On Tue, Jan 12, 2021 at 10:51 PM Peter Zijlstra <[email protected]> wrote:
> >
> > Mark the per-cpu workqueue workers as KTHREAD_IS_PER_CPU.
> >
> > Workqueues have unfortunate semantics in that per-cpu workers are not
> > default flushed and parked during hotplug, however a subset does
> > manual flush on hotplug and hard relies on them for correctness.
> >
> > Therefore play silly games..
> >
> > Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
> > Tested-by: Paul E. McKenney <[email protected]>
> > ---
> 
> Reviewed-by: Lai Jiangshan <[email protected]>
> 
> I like this patchset in that the scheduler takes care of the
> affinities of the tasks when we don't want it to be per-cpu.

Thanks! A possibly even simpler approach would be to have
rebind_workers() kill all workers and have create_worker() spawn us new
ones.

That avoids ever having to use set_cpus_allowed_ptr() on per-cpu
kthreads.... with the exception of rescuer.. still pondering that.

Reply via email to