Messages in this thread | | | Date | Wed, 19 Oct 2011 12:47:32 -0700 (PDT) | From | David Rientjes <> | Subject | Re: patch] cpusets, cgroups: disallow attaching kthreadd |
| |
On Wed, 19 Oct 2011, Peter Zijlstra wrote:
> My thinking is that kthreadd is the mother of all kernel threads and the > kernel assumes it can spawn kthreads without constraints, a valid > assumption IMO. >
Cgroups don't necessarily imply constraints, though, you could devise a cgroup to just do monitoring or statistics tracking for an aggregate of tasks and placing kthreadd in such a cgroup would make perfect sense because then, since children are forked in the same cgroup, you can monitor or gather statistics for all kthreads. This can be your only cgroup on the system.
Cpusets, though, does imply cpu constraints, which is why we decline PF_THREAD_BOUND threads from moving in the first place, which is the source of Mike's issue. It's can_attach() function can explicitly decline kthreadd as well since the cpu constraints of both types of threads should never be altered by either cpusets or sched_setaffinity().
| |