From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Cc: peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org,
mhocko-AlSwsSmVLrQ@public.gmane.org,
kay.sievers-tD+1rO4QERM@public.gmane.org,
mzxreary-uLTowLwuiw4b1SvskN2V4Q@public.gmane.org,
davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
ben-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org,
pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org
Subject: [PATCHSET RFC] cpu,cpuacct: make cpu serve cpuacct files and deprecate cpuacct
Date: Wed, 19 Sep 2012 15:43:42 -0700 [thread overview]
Message-ID: <1348094625-4471-1-git-send-email-tj@kernel.org> (raw)
Hello,
This is an attempt at allowing quick deprecation and removal of
cpuacct. The patchset makes cpu serve the same cpuacct.* files and
updates cgroup core such that it ignores cpuacct if requested to be
co-mounted with cpu whether CONFIG_CGROUP_CPUACCT is enabled or not.
This de-couples cpuacct deprecation on kernel side from userland
transition as long as userland is co-mounting cpu and cpuacct. In
this series, cpuacct implementation is simply copied into cpu, the
goal being to provide base for proper optimization (most likely
periodic collection of stats across the hierarchy).
I didn't try to maintain everything the same. /proc/cgroups and
/proc/PID/cgroup may mis-represent or miss cpuacct entry. Faking it
completely is doable too but I'd like to keep it as simple as
possible.
* If cpuacct is not used, nothing changes of course.
* If cpuacct is requested to be co-mounted with cpu, cpuacct is not
used. It doesn't matter whether CONFIG_CGROUP_CPUACCT is enabled or
not. cpu will provide cpusage.* statistics.
* If cpuacct is requested to be mounted separately and cpuacct is
enabled, cgroup whines before mounting it. If cpuacct is disabled,
it fails.
I think the resulting behavior isn't too crazy and it should allow us
to remove anything cpuacct related fairly soon.
Longer term, I'd prefer to be able to drop the compatibility hack from
cgroup core too although I don't think that's too urgent. I think
userland can either create symlinks for compatibility -
e.g. /sys/fs/cgroup/cpuacct and /sys/fs/cgroup/cpu,cpucct both
pointing to /sys/fs/cgroup/cpu - whether cpuacct exists or not, or
just ignore anything cpuacct related.
This series is based on for-3.7-hierarchy 8c7f6edbda0 ("cgroup: mark
subsystems with broken hierarchy...") and also available in the
following git branch.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-deprecate-cpuacct
include/linux/cgroup.h | 1
init/Kconfig | 11 ++
kernel/cgroup.c | 57 ++++++++++++-
kernel/sched/core.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++-
kernel/sched/fair.c | 1
kernel/sched/rt.c | 1
kernel/sched/sched.h | 7 +
kernel/sched/stop_task.c | 1
8 files changed, 269 insertions(+), 6 deletions(-)
Thanks.
--
tejun
next reply other threads:[~2012-09-19 22:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 22:43 Tejun Heo [this message]
[not found] ` <1348094625-4471-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-09-19 22:43 ` [PATCH 1/3] cgroup: implement CFTYPE_NO_PREFIX Tejun Heo
2012-09-19 22:43 ` [PATCH 2/3] cgroup, sched: let cpu serve the same files as cpuacct Tejun Heo
[not found] ` <1348094625-4471-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-09-20 8:05 ` Glauber Costa
[not found] ` <505ACE36.80603-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-09-20 18:00 ` Tejun Heo
2012-09-19 22:43 ` [PATCH 3/3] cgroup, sched: deprecate cpuacct Tejun Heo
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=1348094625-4471-1-git-send-email-tj@kernel.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=ben-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
--cc=kay.sievers-tD+1rO4QERM@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
--cc=mzxreary-uLTowLwuiw4b1SvskN2V4Q@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.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).