Re: [PATCH 10/10] workqueue: use generic pool-bind/unbind routine for rescuers

From: Tejun Heo
Date: Mon May 05 2014 - 10:54:12 EST


On Sun, Apr 27, 2014 at 12:09:05PM +0800, Lai Jiangshan wrote:
> There are several problems with the code that rescuers bind itself to the pool'
> cpumask
> 1) It uses a way different from the normal workers to bind to the cpumask
> So we can't maintain the normal/rescuer workers under the same framework.
> 2) The the code of cpu-binding for rescuer is complicated
> 3) If one or more cpuhotplugs happen while the rescuer processes the
> scheduled works, the rescuer may not be correctly bound to the cpumask of
> the pool. This is allowed behavior, but is not good. It will be better
> if the cpumask of the rescuer is always kept coordination with the pool
> across any cpuhotplugs.
>
> Using generic pool-bind/unbind routine will solve the above problems,
> and result much more simple code.

Ah, nice. Yeah, I definitely like it. We can solve
iteration-from-oops problem using RCU if it becomes necessary. I
don't quite like the name of bind_entry tho. I'll comment on it on
that patch.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/