From 85b6bc9db6d5ab6980b43c38b5cbd11d24414ce4 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 18 Aug 2015 14:55:18 -0700 Subject: blkcg: move root blkg lookup optimization from throtl_lookup_tg() to __blkg_lookup() Currently, both throttle and cfq policies implement their own root blkg (blkcg_gq) lookup fast path. This patch moves root blkg optimization from throtl_lookup_tg() to __blkg_lookup(). cfq-iosched currently doesn't use blkg_lookup() but will be converted and drop the optimization too. Signed-off-by: Tejun Heo Cc: Vivek Goyal Cc: Arianna Avanzini Signed-off-by: Jens Axboe --- block/blk-throttle.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'block') diff --git a/block/blk-throttle.c b/block/blk-throttle.c index c2c75477a6b2..1f63fc834dc3 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -452,13 +452,6 @@ static void throtl_pd_reset_stats(struct blkg_policy_data *pd) static struct throtl_grp *throtl_lookup_tg(struct throtl_data *td, struct blkcg *blkcg) { - /* - * This is the common case when there are no blkcgs. Avoid lookup - * in this case - */ - if (blkcg == &blkcg_root) - return td_root_tg(td); - return blkg_to_tg(blkg_lookup(blkcg, td->queue)); } -- cgit v1.2.3-59-g8ed1b