]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/main.c
core: add io controller support on the unified hierarchy 3193/head
authorTejun Heo <htejun@fb.com>
Thu, 5 May 2016 20:42:55 +0000 (16:42 -0400)
committerTejun Heo <tj@kernel.org>
Thu, 5 May 2016 20:43:06 +0000 (16:43 -0400)
commit13c31542cc57e1454dccd6383bfdac98cbee5bb1
treed23b7cf447ac2ba86d9377cb6c3070f6445f72f5
parent5119d304ffe4d1bcac27626c842413f5f2defe0d
core: add io controller support on the unified hierarchy

On the unified hierarchy, blkio controller is renamed to io and the interface
is changed significantly.

* blkio.weight and blkio.weight_device are consolidated into io.weight which
  uses the standardized weight range [1, 10000] with 100 as the default value.

* blkio.throttle.{read|write}_{bps|iops}_device are consolidated into io.max.
  Expansion of throttling features is being worked on to support
  work-conserving absolute limits (io.low and io.high).

* All stats are consolidated into io.stats.

This patchset adds support for the new interface.  As the interface has been
revamped and new features are expected to be added, it seems best to treat it
as a separate controller rather than trying to expand the blkio settings
although we might add automatic translation if only blkio settings are
specified.

* io.weight handling is mostly identical to blkio.weight[_device] handling
  except that the weight range is different.

* Both read and write bandwidth settings are consolidated into
  CGroupIODeviceLimit which describes all limits applicable to the device.
  This makes it less painful to add new limits.

* "max" can be used to specify the maximum limit which is equivalent to no
  config for max limits and treated as such.  If a given CGroupIODeviceLimit
  doesn't contain any non-default configs, the config struct is discarded once
  the no limit config is applied to cgroup.

* lookup_blkio_device() is renamed to lookup_block_device().

Signed-off-by: Tejun Heo <htejun@fb.com>
16 files changed:
man/systemd.resource-control.xml
src/basic/cgroup-util.c
src/basic/cgroup-util.h
src/cgtop/cgtop.c
src/core/cgroup.c
src/core/cgroup.h
src/core/dbus-cgroup.c
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h
src/core/main.c
src/core/manager.h
src/core/system.conf
src/core/unit.c
src/shared/bus-unit-util.c
src/systemctl/systemctl.c