To support task performance boosting, the usage of a single knob has the advantage to be a simple solution, both from the implementation and the usability standpoint. However, on a real system it can be difficult to identify a single value for the knob which fits the needs of multiple different tasks. For example, some kernel threads and/or user-space background services should be better managed the "standard" way while we still want to be able to boost the performance of specific workloads. In order to improve the flexibility of the task boosting mechanism this patch is the first of a small series which extends the previous implementation to introduce a "per task group" support. This first patch introduces just the basic CGroups support, a new "schedtune" CGroups controller is added which allows to configure different boost value for different groups of tasks. To keep the implementation simple but still effective for a boosting strategy, the new controller: 1. allows only a two layer hierarchy 2. supports only a limited number of boost groups A two layer hierarchy allows to place each task either: a) in the root control group thus being subject to a system-wide boosting value b) in a child of the root group thus being subject to the specific boost value defined by that "boost group" The limited number of "boost groups" supported is mainly motivated by the observation that in a real system it could be useful to have only few classes of tasks which deserve different treatment. For example, background vs foreground or interactive vs low-priority. As an additional benefit, a limited number of boost groups allows also to have a simpler implementation especially for the code required to compute the boost value for CPUs which have runnable tasks belonging to different boost groups. cc: Tejun Heo <tj@kernel.org> cc: Li Zefan <lizefan@huawei.com> cc: Johannes Weiner <hannes@cmpxchg.org> cc: Ingo Molnar <mingo@redhat.com> cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
90 lines
1.5 KiB
C
90 lines
1.5 KiB
C
/*
|
|
* List of cgroup subsystems.
|
|
*
|
|
* DO NOT ADD ANY SUBSYSTEM WITHOUT EXPLICIT ACKS FROM CGROUP MAINTAINERS.
|
|
*/
|
|
|
|
/*
|
|
* This file *must* be included with SUBSYS() defined.
|
|
* SUBSYS_TAG() is a noop if undefined.
|
|
*/
|
|
|
|
#ifndef SUBSYS_TAG
|
|
#define __TMP_SUBSYS_TAG
|
|
#define SUBSYS_TAG(_x)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CPUSETS)
|
|
SUBSYS(cpuset)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_SCHED)
|
|
SUBSYS(cpu)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_CPUACCT)
|
|
SUBSYS(cpuacct)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_SCHEDTUNE)
|
|
SUBSYS(schedtune)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_BLK_CGROUP)
|
|
SUBSYS(io)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_MEMCG)
|
|
SUBSYS(memory)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_DEVICE)
|
|
SUBSYS(devices)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_FREEZER)
|
|
SUBSYS(freezer)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_NET_CLASSID)
|
|
SUBSYS(net_cls)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_PERF)
|
|
SUBSYS(perf_event)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_NET_PRIO)
|
|
SUBSYS(net_prio)
|
|
#endif
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_HUGETLB)
|
|
SUBSYS(hugetlb)
|
|
#endif
|
|
|
|
/*
|
|
* Subsystems that implement the can_fork() family of callbacks.
|
|
*/
|
|
SUBSYS_TAG(CANFORK_START)
|
|
|
|
#if IS_ENABLED(CONFIG_CGROUP_PIDS)
|
|
SUBSYS(pids)
|
|
#endif
|
|
|
|
SUBSYS_TAG(CANFORK_END)
|
|
|
|
/*
|
|
* The following subsystems are not supported on the default hierarchy.
|
|
*/
|
|
#if IS_ENABLED(CONFIG_CGROUP_DEBUG)
|
|
SUBSYS(debug)
|
|
#endif
|
|
|
|
#ifdef __TMP_SUBSYS_TAG
|
|
#undef __TMP_SUBSYS_TAG
|
|
#undef SUBSYS_TAG
|
|
#endif
|
|
|
|
/*
|
|
* DO NOT ADD ANY SUBSYSTEM WITHOUT EXPLICIT ACKS FROM CGROUP MAINTAINERS.
|
|
*/
|