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@xxxxxxxx> --- 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