From 5d89ff793b002e2bd8c1d490030bf35b6f9ee2db Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Thu, 26 Apr 2012 12:15:46 +0200 Subject: [PATCH] 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 --- backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.25.1