From: Glauber Costa <glommer@parallels.com>
To: <linux-kernel@vger.kernel.org>
Cc: <cgroups@vger.kernel.org>, <devel@openvz.org>,
Paul Turner <pjt@google.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Tejun Heo <tj@kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
handai.szj@gmail.com, Andrew.Phillips@lmax.com,
Serge Hallyn <serge.hallyn@canonical.com>
Subject: [PATCH v4 0/4] per cgroup cpu statistics
Date: Tue, 5 Jun 2012 18:49:37 +0400 [thread overview]
Message-ID: <1338907781-20904-1-git-send-email-glommer@parallels.com> (raw)
Hello,
This is the 4th version of this per-cgroup statistics. My aim with that is
to provide userspace with the necessary tools to export a view of /proc/stat
inside a container, so tools like top would work.
I believe this version merges all the comments from Peter and Paul. Let me know
if I forgot any of them.
I now reuse put_prev_task to account for nr_switches, so no extra walks are added.
For that, I had to add another parameter to the function, but I hope this is
acceptable. Please note that this parameter would still be needed even if
Peter's patch that merges put_prev_task behavior inside pick_next_task.
This is because the previous class may live in a different class and we may
have to call it anyway. In which case a hint like this would be needed.
I believe this to be orthogonal to the work you are doing.
Peter: the patch that adds exec_clock to rt was removed. That was my bad, it
was intended to be part of the series that unifies cpu and cpuacct for the
comounted case. I have them together in my tree, and I made the cut in the wrong
place. It is not needed here.
Let me know what you think of this.
v4:
* read_seq_string used instead of read_map. This is because the
buffer can get very big, and that's easier to fix by using seq_string
* idle time no longer exported. It can be derived from userspace easily
* "steal" changed to "wait", since steal is more our interpretation of it
* nr_switches now being accounted as we walk the tree in put_prev_task, so no
new hierarchy walks are being inserted.
v3:
* completely reworked nr_switches gathering
* separated per-se sleep_start to be more clear about it
Glauber Costa (4):
account guest time per-cgroup as well.
expose fine-grained per-cpu data for cpuacct stats
mark whenever put_prev_task is called from context_switch
expose per-taskgroup schedstats in cgroup
include/linux/sched.h | 2 +-
kernel/sched/core.c | 178 +++++++++++++++++++++++++++++++++++++++++++---
kernel/sched/fair.c | 28 +++++++-
kernel/sched/idle_task.c | 2 +-
kernel/sched/rt.c | 6 +-
kernel/sched/sched.h | 5 ++
kernel/sched/stop_task.c | 2 +-
7 files changed, 207 insertions(+), 16 deletions(-)
--
1.7.10.2
next reply other threads:[~2012-06-05 14:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 14:49 Glauber Costa [this message]
2012-06-05 14:49 ` [PATCH v4 1/4] account guest time per-cgroup as well Glauber Costa
2012-06-05 14:49 ` [PATCH v4 2/4] expose fine-grained per-cpu data for cpuacct stats Glauber Costa
2012-06-05 14:49 ` [PATCH v4 3/4] mark whenever put_prev_task is called from context_switch Glauber Costa
2012-06-05 14:49 ` [PATCH v4 4/4] expose per-taskgroup schedstats in cgroup Glauber Costa
2012-06-14 12:18 ` [PATCH v4 0/4] per cgroup cpu statistics 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=1338907781-20904-1-git-send-email-glommer@parallels.com \
--to=glommer@parallels.com \
--cc=Andrew.Phillips@lmax.com \
--cc=a.p.zijlstra@chello.nl \
--cc=cgroups@vger.kernel.org \
--cc=devel@openvz.org \
--cc=ebiederm@xmission.com \
--cc=handai.szj@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pjt@google.com \
--cc=serge.hallyn@canonical.com \
--cc=tj@kernel.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
all inboxes | Powered by JetHome®