This option allows skipping processes belonging to the blacklisted
cgroups. It matches the regular expression against items from the
/proc/PID/cgroups. Items/lines from the /proc/PID/cgroups are separated
by commas ','. Each item consists of the:
hierarchy-ID:controller-list:cgroup-path
Example of the content on which the regular expression is run:
10:hugetlb:/,9:perf_event:/,8:blkio:/
For cgroups v2 the hierarchy-ID is 0 and the controller-list is ''.
For details see man cgroups.7. The only difference from the man
cgroups.7 is that it uses commas for separation of the items instead
of the new lines. The commas are added by the python-linux-procfs
(it's the behavior of the python-linux-procfs-0.6.3).
Multiple regular expressions can be separated by the semicolon ';'.
Examples:
[scheduler]
isolated_cores=1
cgroup_ps_blacklist=:/daemons\b
It will move all processes away from the core 1 except processes which
belongs to the cgroup '/daemons'. The '\b' is regular expression
metacharacter that matches word boundary (i.e. it matches only
'/daemons', not e.g. '/daemonset' or '/group/daemons'). In this example
we do not care about the hierarchy-ID and the controller-list.
[scheduler]
isolated_cores=1
cgroup_ps_blacklist=\b8:blkio:/,|$
In this example it skips processes belonging to the cgroup '/',
with hierarchy-ID 8 and controller-list blkio. The ',|$' is needed
because the '\b' matches word boundary and the non-alphanumeric
character '/' is not taken as a word, thus the '\b' will not match there.
[scheduler]
isolated_cores=1
cgroup_ps_blacklist=:/daemons\b;:/test\b
In this example two regular expressions are used which tries to match
'/daemons' and '/test' cgroup-path. If either matches (i.e. the OR operator),
the process is skipped (i.e. not moved away from the core 1).
Resolves: rhbz#1980715
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>