lkml.org 
[lkml]   [2008]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cpusets and kthreads, inconsistent behaviour
On Tue, 10 Jun 2008, Max Krasnyansky wrote:

> Hmm, technically you are correct of course. But we do not have any other
> kernel tasks besides kthreads. All the kernel tasks I have on my machines have
> kthreadd as their parent.
> And I'm not aware of any kernel code that changes affinity mask of a
> user-space task without paying attention to the cpuset the task belongs to. If
> you know of any we should fix it because it'd clearly be a bug.
>

This is why it shouldn't belong in the sched or kthread code; the
discrepency that you point out between p->cpus_allowed and
task_cs(p)->cpus_allowed is a cpuset created one.

So to avoid having tasks with a cpus_allowed mask that is not a subset of
its cpuset's set of allowable cpus, the solution would probably be to add
a flavor of cpuset_update_task_memory_state() for a cpus generation value.


\
 
 \ /
  Last update: 2008-06-10 22:59    [W:0.097 / U:2.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site