lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Sep 2012 15:43:42 -0700
From:	Tejun Heo <tj@...nel.org>
To:	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, cgroups@...r.kernel.org,
	lizefan@...wei.com
Cc:	peterz@...radead.org, glommer@...allels.com, mhocko@...e.cz,
	kay.sievers@...y.org, mzxreary@...inter.de, davej@...hat.com,
	ben@...adent.org.uk, pjt@...gle.com
Subject: [PATCHSET RFC] cpu,cpuacct: make cpu serve cpuacct files and deprecate cpuacct

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ