Currently, we only add the tasks to cgroup if cgroup_weight is set by
the user. But if we want to test other blkcg parameters like block
throttle, the fio tasks isn't added to the corresponding cgroup and
it doesn't make sense.
So add the task to the corresponding cgroup if the cgroup name is given.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
}
}
- if (td->o.cgroup_weight && cgroup_setup(td, cgroup_list, &cgroup_mnt))
+ if (td->o.cgroup && cgroup_setup(td, cgroup_list, &cgroup_mnt))
goto err;
errno = 0;