summaryrefslogtreecommitdiff
path: root/src/core/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@fb.com>2016-05-18 13:51:46 -0700
committerSven Eden <yamakuzure@gmx.net>2017-06-16 10:12:58 +0200
commitc70aceb85cc08a984cb89d95b47c558ae721e8b8 (patch)
tree7bfe463464819142278df9f63f036352df68c22c /src/core/cgroup.h
parent27d892d63572af4ddd98401075a7959d5b81f02f (diff)
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.
Diffstat (limited to 'src/core/cgroup.h')
-rw-r--r--src/core/cgroup.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
index 2a5a223eb..4d9b52e1d 100644
--- a/src/core/cgroup.h
+++ b/src/core/cgroup.h
@@ -64,8 +64,8 @@ struct CGroupBlockIODeviceWeight {
struct CGroupBlockIODeviceBandwidth {
LIST_FIELDS(CGroupBlockIODeviceBandwidth, device_bandwidths);
char *path;
- uint64_t bandwidth;
- bool read;
+ uint64_t rbps;
+ uint64_t wbps;
};
struct CGroupContext {