Re: boot cgroup questions

From: Max Krasnyansky
Date: Tue Mar 11 2008 - 22:34:24 EST




Paul Menage wrote:
> On Tue, Mar 11, 2008 at 6:23 PM, Max Krasnyansky <maxk@xxxxxxxxxxxx> wrote:
>> The thing is though that the very next thing we do there is run early
>> userspace. Which begs the question, shouldn't we just do it from early
>> user-space then ?
>
> Seems simplest to me. We have an early boot script that creates a
> "system" cpuset and moves all tasks into it. It seems to work fine for
> us.

Suppose we were to do it from kernel. What's the right way to create a cgroup
without mounting a cgroupfs ?
I just want to play with it. There are a couple of advantages that I see for
doing it from kernel. We can move 'kthreadd' and idle threads into the 'boot'
cgroup early on and therefor later on won't even have to iterate through the
tasks and stuff. Whereas user-space has to iterate through tasks and be smart
about threads that are pinned and stuff. Not a big deal but if kernel code is
simple enough maybe it makes sense.

So, any pointers. How do I do create_cgroup() without fs mounted ?

Max
--
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/