From: Tao Ma Date: Thu, 26 Apr 2012 10:15:46 +0000 (+0200) Subject: fio: Add to cgroup if parameter "cgroup" is enabled. X-Git-Tag: gfio-0.1~2^2~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5d89ff793b002e2bd8c1d490030bf35b6f9ee2db;p=fio.git fio: Add to cgroup if parameter "cgroup" is enabled. 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 Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index f4bc553b..e1dc0ac8 100644 --- a/backend.c +++ b/backend.c @@ -1055,7 +1055,7 @@ static void *thread_main(void *data) } } - 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;