linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
To: "Paul Menage" <menage@google.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	containers@lists.linux-foundation.org,
	LKML <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@elte.hu>,
	"Balbir Singh" <balbir@linux.vnet.ibm.com>
Subject: Re: Revert for cgroups CPU accounting subsystem patch
Date: Tue, 13 Nov 2007 13:18:05 +0530	[thread overview]
Message-ID: <20071113074805.GA13499@linux.vnet.ibm.com> (raw)
In-Reply-To: <6599ad830711122205g88aae4fua8dd76cf6e8ab84d@mail.gmail.com>

On Mon, Nov 12, 2007 at 10:05:24PM -0800, Paul Menage wrote:
> On Nov 12, 2007 10:00 PM, Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> wrote:
> >         On second thoughts, this may be a usefull controller of its own.
> > Say I just want to "monitor" usage (for accounting purpose) of a group of
> > tasks, but don't want to control their cpu consumption, then cpuacct
> > controller would come in handy.
> >
> 
> That's plausible, but having two separate ways of tracking and
> reporting the CPU usage of a cgroup seems wrong.
> 
> How bad would it be in your suggested case if you just give each
> cgroup the same weight?

That's still introducing a deviation from the normal behavior we would
have had we allowed all tasks to be part of the same "control" group/runqueue.

For ex: using nice value to vary bandwidth between tasks makes sense if
they are all part of the same group.

Also an application with more tasks will get more cpu power (as intended)
compared to another app with less tasks, provided they are all
part of the same group.

Regarding your concern about tracking cpu usage in different ways, it
could be mitigated if we have cpuacct controller track usage as per
information present in a task's sched entity structure
(tsk->se.sum_exec_runtime) i.e call cpuacct_charge() from
__update_curr() which would accumulate the execution time of the 
group in a SMP friendly manner (i.e dump it in a per-cpu per-group counter 
first and then aggregate to a global per-group counter).

This will let account and control grouping to be independent if desired.

What do you think?

> So there would be fair scheduling between
> cgroups, which seems as reasonable as any other choice in the event
> that the CPU is contended.

-- 
Regards,
vatsa

  parent reply	other threads:[~2007-11-13  7:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13  5:25 Revert for cgroups CPU accounting subsystem patch Paul Menage
2007-11-13  6:00 ` Srivatsa Vaddagiri
2007-11-13  6:05   ` Paul Menage
2007-11-13  7:00     ` Balbir Singh
2007-11-13  7:10       ` Paul Menage
2007-11-13  7:29         ` Balbir Singh
2007-11-13  7:34           ` Paul Menage
2007-11-13  7:59           ` Srivatsa Vaddagiri
2007-11-13  7:59             ` Paul Menage
2007-11-13  7:48     ` Srivatsa Vaddagiri [this message]
2007-11-13  7:57       ` Paul Menage
2007-11-29 19:17         ` [PATCH] sched: cpu accounting controller Srivatsa Vaddagiri
2007-11-29 19:20           ` Ingo Molnar
2007-11-29 19:39             ` Srivatsa Vaddagiri
2007-11-29 19:30           ` Andrew Morton
2007-11-29 20:18             ` Srivatsa Vaddagiri
2007-11-30 12:42               ` [PATCH] sched: cpu accounting controller (V2) Srivatsa Vaddagiri
2007-11-30 12:35                 ` Ingo Molnar
2007-11-30 13:09                   ` Srivatsa Vaddagiri
2007-11-30 13:34                     ` Ingo Molnar
2007-11-30 12:45                 ` Balbir Singh
2007-11-30 13:53                   ` Ingo Molnar
2007-11-30 14:00                     ` Balbir Singh
2007-11-30 18:45                     ` Balbir Singh
2007-11-30 19:46                       ` Ingo Molnar
2007-12-01  7:48                 ` Paul Menage
2007-12-01  9:51                   ` Balbir Singh

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=20071113074805.GA13499@linux.vnet.ibm.com \
    --to=vatsa@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).