cgroup: Also set io.bfq.weight

Current kernels with BFQ scheduler do not yet set their IO weight
through "io.weight" but through "io.bfq.weight" (using a slightly
different interface supporting only default weights, not per-device
weights). This commit enables "IOWeight=" to just to that.

This patch may be dropped at some time later.

Github-Link: https://github.com/systemd/systemd/issues/7057
Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
Kai Krakow
2019-08-20 11:50:59 +02:00
committed by Lennart Poettering
parent 06e93130b4
commit 2dbc45aea7
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -1063,6 +1063,11 @@ static void cgroup_context_apply(
xsprintf(buf, "default %" PRIu64 "\n", weight);
(void) set_attribute_and_warn(u, "io", "io.weight", buf);
/* FIXME: drop this when distro kernels properly support BFQ through "io.weight"
* See also: https://github.com/systemd/systemd/pull/13335 */
xsprintf(buf, "%" PRIu64 "\n", weight);
(void) set_attribute_and_warn(u, "io", "io.bfq.weight", buf);
if (has_io) {
CGroupIODeviceLatency *latency;
CGroupIODeviceLimit *limit;