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-24 6:31, David Rientjes wrote:
> On Tue, 23 Feb 2010, Miao Xie wrote:
> 
>>> Cpu hotplug sets top_cpuset's cpus_allowed to cpu_active_mask by default, 
>>> regardless of what was onlined or offlined.  cpus_attach in the context of 
>>> your patch (in cpuset_attach()) passes cpu_possible_mask to 
>>> set_cpus_allowed_ptr() if the task is being attached to top_cpuset, my 
>>> question was why don't we pass cpu_active_mask instead?  In other words, I 
>>> think we should do
>>>
>>> 	cpumask_copy(cpus_attach, cpu_active_mask);
>>>
>>> when attached to top_cpuset like my patch did.
>>
>> If we pass cpu_active_mask to set_cpus_allowed_ptr(), task->cpus_allowed just contains
>> the online cpus. In this way, if we do cpu hotplug(such as: online some cpu), we must
>> update cpus_allowed of all tasks in the top cpuset.
>>
>> But if we pass cpu_possible_mask, we needn't update cpus_allowed of all tasks in the
>> top cpuset. And when the kernel looks for a cpu for task to run, the kernel will use
>> cpu_active_mask to filter out offline cpus in task->cpus_allowed. Thus, it is safe.
>>
> 
> That is terribly inconsistent between top_cpuset and all descendants; all 
> other cpusets require that task->cpus_allowed be a subset of 
> cpu_online_mask, including those descendants that allow all cpus (and all 
> mems).
 
I think it is not a big deal because it is safe and doesn't cause any problem.
Beside that, task->cpus_allowed is initialized to cpu_possible_mask on the no-cpuset
kernel, so using cpu_possible_mask to initialize task->cpus_allowed is reasonable.
(top cpuset is a special cpuset, isn't it?)
 


--
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]