Re: [patch] cgroups: disallow attaching kthreadd

From: David Rientjes
Date: Wed Apr 04 2012 - 03:15:13 EST


On Tue, 3 Apr 2012, Mike Galbraith wrote:

> The hazzards of moving kthreadd into a non-root cgroup is still present
> in mainline. Last go 'round stalled with Peter not liking the
> cpuset,cpu per controller specific exclusion. I agree that total
> exclusion is the better option, and below is a respin doing that.
>

We've been through this several times now iterating between two different
functional changes. I appreciate the persistence, but please, again,
explain why you are doing this at the cgroups level rather than the
cpusets level?

The last time we discussed this, you had proposed a patch to only do this
for cpusets after the points I'm about to bring up for the fifth time.
Peter ended up not responding and as I remember it didn't have strong
feelings against doing it only for cpusets. And here we are, yet again,
back to the cgroups version.

There's _nothing_ wrong with attaching a kthread to most cgroups. We do
it for memcg. And now you're trying to break it for ABSOLUTELY NO REASON.

Both points you mention in your changelog below have to do with bad
_cpuset_ behavior, not _cgroup_ behavior.

So nack in this form, but I'm pretty sure you already knew that.

> cgroups: disallow attaching kthreadd
>
> Allowing kthreadd to be moved to a non-root group makes no sense, it being
> a global resource, and needlessly leads unsuspecting users toward trouble.
>
> 1. An RT workqueue worker thread spawned in a task group with no rt_runtime
> allocated is not schedulable. Simple user error, but harmful to the box.
>
> 2. A worker thread which acquires PF_THREAD_BOUND can never leave a cpuset,
> rendering the cpuset immortal.
>
> Save the user some unexpected trouble, just say no.
--
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/