[lxc-devel] [lxd/master] cgroups: detect blkio.bfq.weight knob
brauner on Github
lxc-bot at linuxcontainers.org
Wed Dec 25 16:07:31 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 379 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20191225/019bbe97/attachment.bin>
-------------- next part --------------
From ac8e99439daaa88d8ae82f4bd793398babe69c68 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Wed, 25 Dec 2019 17:06:18 +0100
Subject: [PATCH] cgroups: detect blkio.bfq.weight knob
Closes #6658.
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
lxd/cgroup/init.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lxd/cgroup/init.go b/lxd/cgroup/init.go
index 248c244b52..0bacbb45b2 100644
--- a/lxd/cgroup/init.go
+++ b/lxd/cgroup/init.go
@@ -370,6 +370,11 @@ func init() {
val, ok := cgControllers["blkio"]
if ok && val == V1 && shared.PathExists("/sys/fs/cgroup/blkio/blkio.weight") {
cgControllers["blkio.weight"] = V1
+ } else {
+ val, ok := cgControllers["blkio"]
+ if ok && val == V1 && shared.PathExists("/sys/fs/cgroup/blkio/blkio.bfq.weight") {
+ cgControllers["blkio.weight"] = V1
+ }
}
val, ok = cgControllers["memory"]
More information about the lxc-devel
mailing list