mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zhao Forrest" <forrest.zhao@gmail.com>
To: "Peter Zijlstra" <peterz@infradead.org>
Cc: vatsa@linux.vnet.ibm.com, mingo@elte.hu,
	containers@lists.osdl.org, linux-kernel@vger.kernel.org
Subject: Re: A question about group CFS scheduling
Date: Thu, 26 Jun 2008 16:33:11 +0800	[thread overview]
Message-ID: <ac8af0be0806260133u68a5692flab65e4bb6dcf2a13@mail.gmail.com> (raw)
In-Reply-To: <1214468112.2794.9.camel@twins.programming.kicks-ass.net>

>
> Let me explain the cgroup case (the sanest option IMHO):
>
> initially all your tasks will belong to the root cgroup, eg:
>
> assuming:
> mkdir -p /cgroup/cpu
> mount none /cgroup/cpu -t cgroup -o cpu
>
> Then the root cgroup (cgroup:/) is /cgroup/cpu/ and all tasks will be
> found in /cgroup/cpu/tasks.
>
> You can then create new groups as sibling from this root group, eg:
>
> cgroup:/foo
> cgroup:/bar
>
> They will get a weigth of 1024 by default, exactly as heavy as a nice 0
> task.
>
> That means that no matter how many tasks you stuff into foo, their
> combined cpu time will be as much as a single tasks in cgroup:/ would
> get.
>
> This is fully recursive, so you can also create:
>
> cgroup:/foo/bar and its tasks in turn will get as much combined cpu time
> as a single task in cgroup:/foo would get.
>
> In theory this should go on indefinitely, in practise we'll run into
> serious numerical issues quite quickly.
>
>
> The USER grouping basically creates a fake root and all uids (including
> 0) are its siblings. The only special case is that uid-0 (aka root) will
> get twice the weight of the others.
>

Thank you for your detailed explanation! I have one more question:
cgrouping and USER grouping is mutual exclusive, am I right? That is,
when enabling cgrouping, USER grouping need to be disabled, vice
versa.

Thanks,
Forrest

  reply	other threads:[~2008-06-26  8:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-26  7:19 Zhao Forrest
2008-06-26  8:15 ` Peter Zijlstra
2008-06-26  8:33   ` Zhao Forrest [this message]
2008-06-26  9:43     ` Dhaval Giani
2008-06-26 11:08     ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac8af0be0806260133u68a5692flab65e4bb6dcf2a13@mail.gmail.com \
    --to=forrest.zhao@gmail.com \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=vatsa@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®