diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-05-22 07:06:16 +0900 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-22 07:13:56 +0900 |
commit | db785129c9bce9294a118484cbc9bb6935ca34c2 (patch) | |
tree | a1c9508390cffe4eafc0592701ad566bba672b93 /src/core/cgroup.h | |
parent | 95ae05c0e79868c22b3e8e6fbc53432786876730 (diff) |
cgroup: rework startup logic
Introduce a (unsigned long) -1 as "unset" state for cpu shares/block io
weights, and keep the startup unit set around all the time.
Diffstat (limited to 'src/core/cgroup.h')
-rw-r--r-- | src/core/cgroup.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/cgroup.h b/src/core/cgroup.h index 64d3ac64f5..44482c508d 100644 --- a/src/core/cgroup.h +++ b/src/core/cgroup.h @@ -72,14 +72,12 @@ struct CGroupContext { unsigned long cpu_shares; unsigned long startup_cpu_shares; - bool startup_cpu_shares_set:1; usec_t cpu_quota_per_sec_usec; usec_t cpu_quota_usec; usec_t cpu_quota_period_usec; unsigned long blockio_weight; unsigned long startup_blockio_weight; - bool startup_blockio_weight_set:1; LIST_HEAD(CGroupBlockIODeviceWeight, blockio_device_weights); LIST_HEAD(CGroupBlockIODeviceBandwidth, blockio_device_bandwidths); @@ -96,9 +94,9 @@ struct CGroupContext { void cgroup_context_init(CGroupContext *c); void cgroup_context_done(CGroupContext *c); void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix); -void cgroup_context_apply(Manager *m, CGroupContext *c, CGroupControllerMask mask, const char *path); +void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const char *path, ManagerState state); -CGroupControllerMask cgroup_context_get_mask(Manager *m, CGroupContext *c); +CGroupControllerMask cgroup_context_get_mask(CGroupContext *c); void cgroup_context_free_device_allow(CGroupContext *c, CGroupDeviceAllow *a); void cgroup_context_free_blockio_device_weight(CGroupContext *c, CGroupBlockIODeviceWeight *w); |