cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@parallels.com>
To: Paul Turner <pjt@google.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	cgroups@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	devel@openvz.org, Linux Containers <containers@lists.osdl.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Balbir Singh <bsingharora@gmail.com>,
	Serge Hallyn <serge.hallyn@canonical.com>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: How to draw values for /proc/stat
Date: Mon, 5 Dec 2011 07:32:33 -0200	[thread overview]
Message-ID: <4EDC8FB1.60407@parallels.com> (raw)

Hi,

Specially Peter and Paul, but all the others:

As you can see in https://lkml.org/lkml/2011/12/4/178, and in my answer 
to that, there is a question - one I've asked before but without that 
much of an audience - of whether /proc files read from process living on 
cgroups should display global or per-cgroup resources.

In the past, I was arguing for a knob to control that, but I recently 
started to believe that a knob here will only overcomplicate matters:
if you live in a cgroup, you should display only the resources you can 
possibly use. Global is for whoever is in the main cgroup.

Now, it comes two questions:
1) Do you agree with that, for files like /proc/stat ? I think the most 
important part is to be consistent inside the system, regardless of what 
is done

2) Will cpuacct stay? I think if it does, that becomes almost mandatory 
(at least the bind mount idea is pretty much over here), because drawing 
value for /proc/stat becomes quite complex.
The cpuacct cgroup can provide user, sys, etc values. But we also have:

* nr_context_switches,
* jiffies since boot,
* total_forks,
* nr_running,
* nr_iowait,

Now I doubt any of us want to see /proc/stat extended to accommodate 
things like nr_context_switches, or even worse, nr_running. The way I 
see it, there are two options here:

  a) moving everything to cpu cgroup so we keep all values being drawn
     from the same place
  b) Collect that info from multiple places in a transparent way. ctx,
     nr_running and nr_iowait will probably come from cpu. jiffies can
     come from wherever, and maybe we can even draw total_forks
     from Frederic's and avoid counting it twice.

             reply	other threads:[~2011-12-05  9:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05  9:32 Glauber Costa [this message]
     [not found] ` <4EDC8FB1.60407-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-06  0:05   ` How to draw values for /proc/stat KAMEZAWA Hiroyuki
     [not found]     ` <20111206090543.e72128b6.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-12-06  0:17       ` Glauber Costa
2011-12-07 14:17   ` Zhu Yanhai
2011-12-09 14:07     ` Peter Zijlstra
2011-12-09 14:03   ` Peter Zijlstra
2011-12-09 14:55     ` Glauber Costa
     [not found]       ` <4EE22179.5090106-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-11 14:50         ` Glauber Costa
     [not found]           ` <4EE4C350.90509-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-11 19:11             ` KOSAKI Motohiro
     [not found]               ` <4EE5006F.6070604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-11 20:48                 ` Glauber Costa
2011-12-12  0:31             ` KAMEZAWA Hiroyuki
     [not found]               ` <20111212093116.96537551.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-12-12  7:06                 ` Glauber Costa
     [not found]                   ` <4EE5A7FA.8050707-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-12  8:22                     ` Glauber Costa
2011-12-12  9:33         ` Peter Zijlstra
2011-12-12  9:35           ` Glauber Costa

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=4EDC8FB1.60407@parallels.com \
    --to=glommer@parallels.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bsingharora@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=containers@lists.osdl.org \
    --cc=devel@openvz.org \
    --cc=fweisbec@gmail.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pjt@google.com \
    --cc=serge.hallyn@canonical.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;
as well as URLs for NNTP newsgroup(s).