]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/cgroup.c
core: update CGroupBlockIODeviceBandwidth to record both rbps and wbps
authorTejun Heo <htejun@fb.com>
Wed, 18 May 2016 20:51:46 +0000 (13:51 -0700)
committerTejun Heo <tj@kernel.org>
Wed, 18 May 2016 20:51:46 +0000 (13:51 -0700)
commit979d03117ffeccd2cc18c8ff843932b03ea065b9
tree9ecaaf6e05d5f050955ab39892499a84389eb6bc
parentac06a0cf8a5c5bd58bfa022408361e982f100bcb
core: update CGroupBlockIODeviceBandwidth to record both rbps and wbps

CGroupBlockIODeviceBandwith is used to keep track of IO bandwidth limits for
legacy cgroup hierarchies.  Unlike the unified hierarchy counterpart
CGroupIODeviceLimit, a CGroupBlockIODeviceBandwiddth records either a read or
write limit and has a couple issues.

* There's no way to clear specific config entry.

* When configs are cleared for an IO direction of a unit, the kernel settings
  aren't cleared accordingly creating discrepancies.

This patch updates CGroupBlockIODeviceBandwidth so that it behaves similarly to
CGroupIODeviceLimit - each entry records both rbps and wbps limits and is
cleared if both are at default values after kernel settings are updated.
src/core/cgroup.c
src/core/cgroup.h
src/core/dbus-cgroup.c
src/core/load-fragment.c