Signed-off-by: Andreas Herrmann <aherrmann@xxxxxxxx> --- cgroup.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/cgroup.c b/cgroup.c index c6369f54..903c569e 100644 --- a/cgroup.c +++ b/cgroup.c @@ -236,15 +236,29 @@ int cgroup_setup(struct thread_data *td, struct flist_head *clist, struct cgroup if (write_str_to_file(td, (*mnt)->path, "cgroup.subtree_control", "+io", "cgroup open cgroup.subtree_control")) goto err; - if (write_int_to_file(td, root, "io.weight", - td->o.cgroup_weight, - "cgroup open io.weight")) - goto err; + if (td->o.cgroup_use_bfq) { + if (write_int_to_file(td, root, "io.bfq.weight", + td->o.cgroup_weight, + "cgroup open io.bfq.weight")) + goto err; + } else { + if (write_int_to_file(td, root, "io.weight", + td->o.cgroup_weight, + "cgroup open io.weight")) + goto err; + } } else { - if (write_int_to_file(td, root, "blkio.weight", - td->o.cgroup_weight, - "cgroup open blkio.weight")) - goto err; + if (td->o.cgroup_use_bfq) { + if (write_int_to_file(td, root, "blkio.bfq.weight", + td->o.cgroup_weight, + "cgroup open blkio.bfq.weight")) + goto err; + } else { + if (write_int_to_file(td, root, "blkio.weight", + td->o.cgroup_weight, + "cgroup open blkio.weight")) + goto err; + } } } -- 2.29.0