]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/cgroup: Apply IODeviceWeight= through BFQ attributes as well
authorMichal Koutný <mkoutny@suse.com>
Fri, 10 Dec 2021 17:41:09 +0000 (18:41 +0100)
committerMichal Koutný <mkoutny@suse.com>
Wed, 23 Mar 2022 18:20:51 +0000 (19:20 +0100)
commit9f0c0c4e158e835c7227dd677d6148607eece89d
tree9be51f61e76d2169f578e237b12b250c9f4e8e01
parent2859932bd64d61a89f85fa027762bc16961fcf53
core/cgroup: Apply IODeviceWeight= through BFQ attributes as well

There are two possible IO control mechanisms (io.cost and BFQ) that
expose separate weights APIs. In systemd units we configure only a
single device weight value so we need to write it to both attribute
files.
This patch extends to devices what is already done for default cgroup IO
weight in commit 2dbc45aea747 ("cgroup: Also set io.bfq.weight"). This
is possible with kernels >= v5.4 with commit 795fe54c2a82 ("bfq: Add
per-device weight"). A warning is logged if the write fails on older kernels.

Since per-device weight of a particular device cannot use both io.cost
policy and BFQ scheduler, at least one warning is always expected with
this approach (the method that is unconfigured).
src/core/cgroup.c