From: Andreas Herrmann <aherrmann@suse.com>
To: Jens Axboe <axboe@fb.com>
Cc: fio@vger.kernel.org
Subject: [PATCH 3/3] cgroup: Try to use blkio.bfq.weight if blkio.weight is not available
Date: Thu, 27 Aug 2020 14:15:33 +0200 [thread overview]
Message-ID: <20200827121533.GF6041@suselix> (raw)
In-Reply-To: <20200827120722.GC6041@suselix>
Newer kernels just provide blkio.bfq.weight for blkio contoller. Try
to use this attribute when legacy file is not available.
Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
---
cgroup.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/cgroup.c b/cgroup.c
index 43513733..6edb5b14 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -218,8 +218,14 @@ int cgroup_setup(struct thread_data *td, struct flist_head *clist, struct cgroup
}
if (write_int_to_file(td, root, "blkio.weight",
td->o.cgroup_weight,
- "cgroup open weight"))
- goto err;
+ "cgroup open blkio.weight")) {
+ td_clear_error(td);
+ log_err("Trying to use blkio.bfq.weight\n");
+ if (write_int_to_file(td, root, "blkio.bfq.weight",
+ td->o.cgroup_weight,
+ "cgroup open blkio.bfq.weight"))
+ goto err;
+ }
}
if (!cgroup_write_pid(td, root, (*mnt)->cgroup2)) {
--
2.28.0
next prev parent reply other threads:[~2020-08-27 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 12:07 [PATCH 0/3] cgroup: Misc fixes Andreas Herrmann
2020-08-27 12:08 ` [PATCH 1/3] cgroup: Fix typo Andreas Herrmann
2020-08-27 12:12 ` [PATCH 2/3] cgroup: Fix handling when cgroup blkio and cgroup-v2 are mounted Andreas Herrmann
2020-08-27 12:15 ` Andreas Herrmann [this message]
2020-08-28 17:29 ` [PATCH 3/3] cgroup: Try to use blkio.bfq.weight if blkio.weight is not available Sitsofe Wheeler
2020-08-31 5:54 ` Andreas Herrmann
2020-08-31 7:33 ` [PATCH 0/3] cgroup: Misc fixes Andreas Herrmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200827121533.GF6041@suselix \
--to=aherrmann@suse.com \
--cc=axboe@fb.com \
--cc=fio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.