Skip to content
Snippets Groups Projects
Commit 78c662d6 authored by James Morse's avatar James Morse
Browse files

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: default avatarJames 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.
parent 0b2b277d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment