-
- Downloads
fs/resctrl: cgroup: Add resctrl cgroup controller
Resctrl allows tasks to be grouped into control groups, (a totally
separate interface to cgroups), each of which have a configuration
policy that affects the tasks prioritisation in the cache, or the
memory bandwidth available when the task is running.
The resctrl tasks file is used to assign threads to a control group.
New threads inherit the resctrl settings from their parent.
If a process is continually creating new threads, it can create new
processes while user-space is assigning the threads to the control
group. This means user-space has to continually poll the list of threads
when it wants to move a process between control groups.
Another level of abstraction would help, so that a group of threads
can be moved between control groups in one go. New threads should
inherit the new value, even if their parent hasn't been updated yet.
Add a new cgroup controller named resctrl. This allows a cgroup to be
labelled with the 'id' of a resctrl control or monitor group, which
is used to look up the closid and rmid.
New processes inherit the setting from the cgroup, meaning that new
processes created after the label is changed use the new label.
The relative path of the resctrl group is provided for convenience.
TODO: turns out cgroups now supports threads, how does that work?
TODO: migration is a thing in cgroups - what is that about?
Signed-off-by:
James Morse <james.morse@arm.com>
N.B. This uses the id for writes in preference to the path as perf
is already restricted to a u64 for the configuration.
Showing
- fs/resctrl/Kconfig 12 additions, 0 deletionsfs/resctrl/Kconfig
- fs/resctrl/Makefile 1 addition, 0 deletionsfs/resctrl/Makefile
- fs/resctrl/cgroup.c 203 additions, 0 deletionsfs/resctrl/cgroup.c
- fs/resctrl/internal.h 3 additions, 0 deletionsfs/resctrl/internal.h
- fs/resctrl/rdtgroup.c 61 additions, 26 deletionsfs/resctrl/rdtgroup.c
- include/linux/cgroup_subsys.h 5 additions, 0 deletionsinclude/linux/cgroup_subsys.h
- include/linux/resctrl.h 2 additions, 0 deletionsinclude/linux/resctrl.h
Loading
Please register or sign in to comment