All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@parallels.com>
To: Balbir Singh <bsingharora@gmail.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Paul Turner <pjt@google.com>, <linux-kernel@vger.kernel.org>,
	<paul@paulmenage.org>, <lizf@cn.fujitsu.com>,
	<daniel.lezcano@free.fr>, <a.p.zijlstra@chello.nl>,
	<jbottomley@parallels.com>, <fweisbec@gmail.com>
Subject: Re: [PATCH v2 14/14] Change CPUACCT to default n
Date: Thu, 17 Nov 2011 13:58:42 -0200	[thread overview]
Message-ID: <4EC52F32.2040708@parallels.com> (raw)
In-Reply-To: <CAKTCnznzpqUbMJEMwaewwjvMW1fG0J3=a8JxqKiHKNuffO7azg@mail.gmail.com>

On 11/17/2011 12:58 AM, Balbir Singh wrote:
> On Thu, Nov 17, 2011 at 8:19 AM, Glauber Costa<glommer@parallels.com>  wrote:
>> On 11/16/2011 09:52 PM, KAMEZAWA Hiroyuki wrote:
>>>
>>> On Wed, 16 Nov 2011 15:51:27 +0530
>>> Balbir Singh<bsingharora@gmail.com>    wrote:
>>>
>>>>>
>>>>> On the other hand, I don't think much discussion remains for cpuacct,
>>>>> everyone's pretty unanimous in that they'd like to see it deprecated.
>>>>> By splitting this up we can close out that quickly while we figure out
>>>>> the
>>>>> best way to resolve the above.
>>>>>
>>>>
>>>> I'd give it a thumbs up, if we can create sched groups and provide
>>>> accounting without control - like we can for the memory cgroup today.
>>>>
>>>
>>> Isn't it possible ?
>>>
>>> Thanks,
>>> -Kame
>>>
>> I must say I don't really understand what exactly you propose, and how it is
>> different from what we have today.
>>
>> My take is that you are talking about a single cgroup in which you can have
>> the functionality of both cpuacct and cpu, but surrounded by knobs that
>> allows you to turn them off individually.
>>
>> Am I right?
>>
>
> No here is what I am asking for
>
> I don't want CPU control, just accounting, so I create the following groups
>
>                            a
>                         /    \
>                        V    V
>                        b     c
>
> Today, with the cpu controller, the moment I create a, b and c, they
> get default shares and if I put tasks, their b/w is decided by the
> shares, what if I don't want control, but I want to account for their
> time only?
>
> Balbir

I think that if this really a requirement, cpuacct should stay. I was 
working under the assumption that it was not really an important case - 
so thanks for the clarification. Peter and Paul can chime in here, but I 
think that this requirement poses constraints to the cpu cgroup and 
consequently the scheduler - both in its current incarnation and in what 
come in the future - that may not be acceptable. What I am concerned 
about is that it might mandate the scheduler to always test whether or 
not the grouping has a scheduling effect or not - and then walk the 
group if it is not, etc. In a summary, if we can or cannot bundle 
processes together for scheduling purposes, we'll likely need separate 
data structures anyway.

A lot of the code I wrote can be reused to at least make it faster in 
the case in which only the root is mounted - for cpuacct.stat at least.

However, the big question remains: The most expensive operation for 
cpuacct also seem to be the most important, cpuusage, which was a big 
part of the motivation to bundle them all together. Maybe then Paul's 
co-mounting idea starts to make sense, but it will still be quite slow 
for your usage, in which the groups are clearly different.

I think the best I can come up with right now, is to base my work on 
cpuacct - I am fine with that, and it was actually how my first version 
looked like - and then think about a way to make cpuusage faster later...

  reply	other threads:[~2011-11-17 15:59 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 21:19 [PATCH v2 00/14] per-cgroup /proc/stat Glauber Costa
2011-11-01 21:19 ` [PATCH v2 01/14] trivial: initialize root cgroup's sibling list Glauber Costa
2011-11-11 21:34   ` Paul Turner
2011-11-14 19:44     ` Glauber Costa
2011-11-14 21:44       ` Peter Zijlstra
2011-11-18 23:42   ` [tip:sched/core] sched, trivial: Initialize " tip-bot for Glauber Costa
2011-11-01 21:19 ` [PATCH v2 02/14] Change cpustat fields to an array Glauber Costa
2011-11-01 21:19 ` [PATCH v2 03/14] Move /proc/stat logic inside sched.c Glauber Costa
2011-11-12  1:35   ` Paul Turner
2011-11-12 10:27     ` Glauber Costa
2011-11-01 21:19 ` [PATCH v2 04/14] split kernel stat in two Glauber Costa
2011-11-01 21:19 ` [PATCH v2 05/14] Display /proc/stat information per cgroup Glauber Costa
2011-11-01 21:19 ` [PATCH v2 06/14] Make total_forks per-cgroup Glauber Costa
2011-11-01 21:19 ` [PATCH v2 07/14] per-cgroup boot time Glauber Costa
2011-11-01 21:19 ` [PATCH v2 08/14] Report steal time for cgroup Glauber Costa
2011-11-01 21:19 ` [PATCH v2 09/14] Keep nr_iowait per cgroup Glauber Costa
2011-11-10 10:27   ` Andrew Wagin
2011-11-01 21:19 ` [PATCH v2 10/14] Keep number of context switches per-cgroup Glauber Costa
2011-11-01 21:19 ` [PATCH v2 11/14] provide a version of cpuacct statistics inside cpu cgroup Glauber Costa
2011-11-01 21:19 ` [PATCH v2 12/14] Keep number of running processes per-cgroup Glauber Costa
2011-11-14 14:42   ` Andrew Wagin
2011-11-01 21:19 ` [PATCH v2 13/14] provide a version of cpuusage statistics inside cpu cgroup Glauber Costa
2011-11-09 11:51   ` Andrew Wagin
2011-11-09 11:58     ` Glauber Costa
2011-11-09 14:18       ` Andrew Wagin
2011-11-09 15:30         ` Peter Zijlstra
2011-11-09 16:51         ` Glauber Costa
2011-11-10  8:59           ` Andrew Wagin
2011-11-01 21:19 ` [PATCH v2 14/14] Change CPUACCT to default n Glauber Costa
2011-11-11 21:33   ` Paul Turner
2011-11-12 10:29     ` Glauber Costa
2011-11-15 11:02       ` Paul Turner
2011-11-16 10:21         ` Balbir Singh
2011-11-16 23:52           ` KAMEZAWA Hiroyuki
2011-11-17  2:49             ` Glauber Costa
2011-11-17  2:58               ` Balbir Singh
2011-11-17 15:58                 ` Glauber Costa [this message]
2011-11-21  1:59                   ` KAMEZAWA Hiroyuki
2011-11-24 13:24                     ` Peter Zijlstra
2011-11-24 16:07                       ` Glauber Costa
2011-11-24 16:29                         ` Peter Zijlstra
2011-11-24 16:38                           ` Glauber Costa
2011-11-24 16:58                             ` Peter Zijlstra
2011-11-25  5:38                             ` Balbir Singh
2011-11-25 10:19                               ` Peter Zijlstra
2011-11-26 13:18                                 ` Paul Turner
2011-11-28  8:29                                   ` Balbir Singh
2011-11-25  2:05         ` Li Zefan
2011-11-25 10:09           ` Peter Zijlstra
2011-11-26 13:07           ` Paul Turner

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=4EC52F32.2040708@parallels.com \
    --to=glommer@parallels.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bsingharora@gmail.com \
    --cc=daniel.lezcano@free.fr \
    --cc=fweisbec@gmail.com \
    --cc=jbottomley@parallels.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=paul@paulmenage.org \
    --cc=pjt@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.