[PATCH] fio: Add to cgroup if parameter "cgroup" is enabled.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tao Ma <boyu.mt@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 backend.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend.c b/backend.c
index f4bc553..e1dc0ac 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;
-- 
1.7.9.GIT

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux