]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: translate between IO and BlockIO settings to ease transition 3290/head
authorTejun Heo <htejun@fb.com>
Thu, 19 May 2016 00:35:12 +0000 (17:35 -0700)
committerTejun Heo <tj@kernel.org>
Thu, 19 May 2016 00:35:12 +0000 (17:35 -0700)
commit538b48524cf48afc299ab78690bc03c18af67ede
tree70c5612292ae16f1485644bab7c80bdba365565e
parent64faf04c1f178804e066972ab0d6ff1181c0d373
core: translate between IO and BlockIO settings to ease transition

Due to the substantial interface changes in cgroup unified hierarchy, new IO
settings are introduced.  Currently, IO settings apply only to unified
hierarchy and BlockIO to legacy.  While the transition is necessary, it's
painful for users to have to provide configs for both.  This patch implements
translation from one config set to another for configs which make sense.

* The translation takes place during application of the configs.  Users won't
  see IO or BlockIO settings appearing without being explicitly created.

* The translation takes place only if there is no config for the matching
  cgroup hierarchy type at all.

While this doesn't provide comprehensive compatibility, it should considerably
ease transition to the new IO settings which are a superset of BlockIO
settings.

v2:

- Update test-cgroup-mask.c so that it accounts for the fact that
  CGROUP_MASK_IO and CGROUP_MASK_BLKIO move together.  Also, test/parent.slice
  now sets IOWeight instead of BlockIOWeight.
man/systemd.resource-control.xml
src/core/cgroup.c
src/test/test-cgroup-mask.c
test/parent.slice