Re: [PATCH 08/12] blkcg: use the usual get blkg path for rootblkio_group

From: Vivek Goyal
Date: Thu Jan 19 2012 - 09:41:51 EST


On Wed, Jan 18, 2012 at 05:11:26PM -0800, Tejun Heo wrote:
> For root blkg, blk_throtl_init() was using throtl_alloc_tg()
> explicitly and cfq_init_queue() was manually initializing embedded
> cfqd->root_group, adding unnecessarily different code paths to blkg
> handling.
>
> Make both use the usual blkio_group get functions - throtl_get_tg()
> and cfq_get_cfqg() - for the root blkio_group too. Note that
> blk_throtl_init() callsite is pushed downwards in
> blk_alloc_queue_node() so that @q is sufficiently initialized for
> throtl_get_tg().
>
> This simplifies root blkg handling noticeably for cfq and will allow
> further modularization of blkcg API.

Does this work if BLK_CGROUP=n?

I am trying to think that why did I keep allocating root cgroup statically
for CFQ. May be the reason was that this group was present even if
CFQ_GROUP_IOSCHED=n. There was other code which assumed a group to be
always present and I did not want to put more #ifdef.

Anyway, if it works well, with BLK_CGROUP=n, then it is fine.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/