1
0
Fork 0
tuned/tuned
Jaroslav Škarvada 438ff4f899
scheduler: new option cgroup_ps_blacklist
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>
2021-07-23 10:55:00 +02:00
..
admin Project renamed to TuneD 2021-05-17 22:09:02 +02:00
daemon Merge pull request #330 from CZerta/fixing_active_profile 2021-07-01 22:47:12 +02:00
exports Removing depedency on python-decorator package. 2021-07-07 10:40:41 +02:00
gtk Project renamed to TuneD 2021-05-17 22:09:02 +02:00
hardware Merge branch 'master' into project-rename 2021-06-03 17:20:55 +02:00
monitors monitors: Fix adding a hotplugged device to a monitor 2019-03-06 19:51:10 +01:00
plugins scheduler: new option cgroup_ps_blacklist 2021-07-23 10:55:00 +02:00
profiles profiles: fix loading multiple profiles if there are repeating profiles 2021-06-09 11:00:18 +02:00
storage Fix pickle provider 2018-10-15 13:20:14 +02:00
units Project renamed to TuneD 2021-05-17 22:09:02 +02:00
utils Merge branch 'master' into project-rename 2021-06-03 17:20:55 +02:00
__init__.py misc: bumped year in copyright to 2013 2013-11-27 09:30:07 +01:00
consts.py bootloader: support for systems that don't have grub installed 2021-07-07 11:16:08 +00:00
exceptions.py Create exception logger outside of TunedException class to not confuse logs.get method 2012-01-26 10:41:59 +01:00
logs.py Project renamed to TuneD 2021-05-17 22:09:02 +02:00
patterns.py separate design pattern bases 2011-12-14 17:40:31 +01:00
version.py new release (2.16.0-rc.1) 2021-07-07 23:46:06 +02:00