diff options
author | Tejun Heo <tj@kernel.org> | 2019-05-13 12:37:17 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2019-05-31 11:48:40 -0700 |
commit | a5e112e6424adb77d953eac20e6936b952fd6b32 (patch) | |
tree | f338dc9c274907e5d2321f9e7e4a8608fdb202ea /include/linux/cgroup.h | |
parent | c03cd7738a83b13739f00546166969342c8ff014 (diff) |
cgroup: add cgroup_parse_float()
cgroup already uses floating point for percent[ile] numbers and there
are several controllers which want to take them as input. Add a
generic parse helper to handle inputs.
Update the interface convention documentation about the use of
percentage numbers. While at it, also clarify the default time unit.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 0297f930a56e..3745ecdad925 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -131,6 +131,8 @@ void cgroup_free(struct task_struct *p); int cgroup_init_early(void); int cgroup_init(void); +int cgroup_parse_float(const char *input, unsigned dec_shift, s64 *v); + /* * Iteration helpers and macros. */ |