1
0
Fork 0
tuned/tuned/plugins
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
..
instance Rework device handling to avoid races caused by hotplug 2019-03-06 19:52:07 +01:00
__init__.py An attempt to port Tuned to python3 and keeping it python2 compatible 2017-12-21 10:20:13 +01:00
base.py Refactor verification result logging into a separate method 2019-03-12 14:11:42 +01:00
decorators.py plugin commands: add numeric priority to enforce execution order 2013-01-23 18:49:45 +01:00
exceptions.py units manager: handle NotSupportedPluginException 2013-01-28 16:21:12 +01:00
hotplug.py Rework device handling to avoid races caused by hotplug 2019-03-06 19:52:07 +01:00
plugin_audio.py Remove testing config option hints from audio plugin 2019-03-08 14:18:11 +01:00
plugin_bootloader.py bootloader: make skip_grub_config consistent with initrd_remove_dir 2021-07-21 11:55:52 +02:00
plugin_cpu.py Merge pull request #277 from olysonek/cpu-comparison-fix 2020-06-04 19:32:15 +02:00
plugin_disk.py plugin_disk: fixed traceback on invalid readahead values 2019-11-22 16:45:34 +01:00
plugin_eeepc_she.py Fix calling methods of parent classes 2018-01-14 15:13:27 +01:00
plugin_irqbalance.py Add irqbalance plugin 2020-06-05 10:23:24 +02:00
plugin_modules.py Make a copy of devices when verifying tuning 2019-03-06 19:56:13 +01:00
plugin_mounts.py Unify storage keys 2018-06-04 12:52:08 +02:00
plugin_net.py Fix conditional for setting net device param 2021-06-22 10:39:02 +03:00
plugin_rtentsk.py add rtentsk plugin 2020-07-28 12:48:24 +02:00
plugin_scheduler.py scheduler: new option cgroup_ps_blacklist 2021-07-23 10:55:00 +02:00
plugin_script.py plugin_script: Execute all scripts regardless of errors 2019-07-09 11:31:20 +02:00
plugin_scsi_host.py Rework device handling to avoid races caused by hotplug 2019-03-06 19:52:07 +01:00
plugin_selinux.py Fix calling methods of parent classes 2018-01-14 15:13:27 +01:00
plugin_service.py service: fixed for FIPS 2020-11-23 19:53:45 +01:00
plugin_sysctl.py sysctl: Make reapply_sysctl ignore configs from /usr 2019-11-27 16:22:18 +01:00
plugin_sysfs.py Make a copy of devices when verifying tuning 2019-03-06 19:56:13 +01:00
plugin_systemd.py Project renamed to TuneD 2021-05-17 22:09:02 +02:00
plugin_usb.py An attempt to port Tuned to python3 and keeping it python2 compatible 2017-12-21 10:20:13 +01:00
plugin_video.py An attempt to port Tuned to python3 and keeping it python2 compatible 2017-12-21 10:20:13 +01:00
plugin_vm.py mssql: updated tuning 2019-01-08 15:07:03 +01:00
repository.py Fix calling methods of parent classes 2018-01-14 15:13:27 +01:00