* [PATCH] fio: Add to cgroup if parameter "cgroup" is enabled.
@ 2012-04-26 9:24 Tao Ma
2012-04-26 10:14 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Tao Ma @ 2012-04-26 9:24 UTC (permalink / raw)
To: fio; +Cc: axboe
From: Tao Ma <boyu.mt@taobao.com>
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fio: Add to cgroup if parameter "cgroup" is enabled.
2012-04-26 9:24 [PATCH] fio: Add to cgroup if parameter "cgroup" is enabled Tao Ma
@ 2012-04-26 10:14 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2012-04-26 10:14 UTC (permalink / raw)
To: Tao Ma; +Cc: fio
On 04/26/2012 11:24 AM, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
>
> 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.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-26 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-26 9:24 [PATCH] fio: Add to cgroup if parameter "cgroup" is enabled Tao Ma
2012-04-26 10:14 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox