Re: [PATCH 1/2] workqueue: update numa affinity info at node hotplug

From: Lai Jiangshan
Date: Tue Jan 13 2015 - 02:18:07 EST


On 12/26/2014 04:11 AM, Tejun Heo wrote:
> On Wed, Dec 17, 2014 at 01:56:29PM +0900, Kamezawa Hiroyuki wrote:
>> Let me correct my words. Main purpose of this patch 1/2 is handling a case "node disappers" after boot.
>> And try to handle physicall node hotplug caes.
>>
>> Changes of cpu<->node relationship at CPU_ONLINE is handled in patch 2/2.
>
> Can you please make numa code itself maintain the cpu to nodemask
> maps? Let's make workqueue a simple consumer of that and we don't
> have proper notification mechanism for node up/down events?
>
> Thanks.
>

The Mapping of the *online* cpus to nodes is already maintained by numa code.

What the workqueue needs is a special Mapping:
The Mapping of the *possible* cpus to nodes

But this mapping (if the numa code maintain it) is a trouble:
"possible" implies the mapping is stable/constant/immutable, it is hard to
ensure it in the numa code.

if mutability of this mapping is acceptable, we just move 20~40 LOC of code
from workqueue to numa code, all the other complexities about it are still in workqueue.c.

Thanks
Lai
--
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/