Re: [regression] cpuset,mm: update tasks' mems_allowed in time (58568d2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



on 2010-2-23 6:00, David Rientjes wrote:
> On Mon, 22 Feb 2010, Nick Piggin wrote:
> 
>> If you have a concurrent reader without any synchronisation, then what
>> stops it from loading a word of the mask before stores to add the new
>> nodes and then loading another word of the mask after the stores to
>> remove the old nodes? (which can give an empty mask).
>>
> 
> Currently nothing, so we'll need a variant for configurations where the 
> size of nodemask_t is larger than we can atomically store.
> 

Sorry, Could you explain what you advised?
I think it is hard to fix this problem by adding a variant, because it is
hard to avoid loading a word of the mask before

	nodes_or(tsk->mems_allowed, tsk->mems_allowed, *newmems);

and then loading another word of the mask after

	tsk->mems_allowed = *newmems;

unless we use lock.

Maybe we need a rw-lock to protect task->mems_allowed.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]