diff options
author | Tejun Heo <tj@kernel.org> | 2015-08-04 15:20:55 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-08-04 15:20:55 -0400 |
commit | 6abc8ca19df0078de17dc38340db3002ed489ce7 (patch) | |
tree | 126fd69e8b4645e1da77f26ec73ea711e7b2165f /include | |
parent | d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff) | |
download | linux-6abc8ca19df0078de17dc38340db3002ed489ce7.tar.gz linux-6abc8ca19df0078de17dc38340db3002ed489ce7.tar.bz2 linux-6abc8ca19df0078de17dc38340db3002ed489ce7.zip |
cgroup: define controller file conventions
Traditionally, each cgroup controller implemented whatever interface
it wanted leading to interfaces which are widely inconsistent.
Examining the requirements of the controllers readily yield that there
are only a few control schemes shared among all.
Two major controllers already had to implement new interface for the
unified hierarchy due to significant structural changes. Let's take
the chance to establish common conventions throughout all controllers.
This patch defines CGROUP_WEIGHT_MIN/DFL/MAX to be used on all weight
based control knobs and documents the conventions that controllers
should follow on the unified hierarchy. Except for io.weight knob,
all existing unified hierarchy knobs are already compliant. A
follow-up patch will update io.weight.
v2: Added descriptions of min, low and high knobs.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cgroup.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index a593e299162e..c6bf9d30c270 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -22,6 +22,15 @@ #ifdef CONFIG_CGROUPS +/* + * All weight knobs on the default hierarhcy should use the following min, + * default and max values. The default value is the logarithmic center of + * MIN and MAX and allows 100x to be expressed in both directions. + */ +#define CGROUP_WEIGHT_MIN 1 +#define CGROUP_WEIGHT_DFL 100 +#define CGROUP_WEIGHT_MAX 10000 + /* a css_task_iter should be treated as an opaque object */ struct css_task_iter { struct cgroup_subsys *ss; |