Re: [PATCH] cpuset: mm: Reduce large amounts of memory barrier relateddamage v2

From: Miao Xie
Date: Wed Mar 07 2012 - 22:42:37 EST


On wed, 7 Mar 2012 11:22:01 +0000, Mel Gorman wrote:
>> Beside that, we need deal with fork() carefully, or it is possible that the child
>> task will be set to a wrong nodemask.
>>
>
> Can you clarify this statement please? It's not clear what the old code
> did that protected against problems in fork() versus this patch. fork is
> not calling get_mems_allowed() for example or doing anything special
> around mems_allowed.
>
> Maybe you are talking about an existing problem whereby during fork
> there should be get_mems_allowed/put_mems_allowed and the mems_allowed
> mask gets copied explicitly?

Yes, If someone updates cpuset's nodemask or cpumask before the child task is attached
into the cpuset cgroup, the child task's nodemask and cpumask can not be updated, just
holds the old mask.

We can fix this problem by seqcounter in a new patch.(It seems the freeze subsystem also
has the same problem)

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