diff options
author | Tejun Heo <tj@kernel.org> | 2015-08-18 17:55:18 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-18 18:49:17 -0400 |
commit | 85b6bc9db6d5ab6980b43c38b5cbd11d24414ce4 (patch) | |
tree | 7389d8656738b72cc7c8c7569247db31800d9246 /block/blk-throttle.c | |
parent | 24f290466f79a6497f1654f64b9a841872cba3ca (diff) |
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 <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r-- | block/blk-throttle.c | 7 |
1 files changed, 0 insertions, 7 deletions
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) | |||
452 | static struct throtl_grp *throtl_lookup_tg(struct throtl_data *td, | 452 | static struct throtl_grp *throtl_lookup_tg(struct throtl_data *td, |
453 | struct blkcg *blkcg) | 453 | struct blkcg *blkcg) |
454 | { | 454 | { |
455 | /* | ||
456 | * This is the common case when there are no blkcgs. Avoid lookup | ||
457 | * in this case | ||
458 | */ | ||
459 | if (blkcg == &blkcg_root) | ||
460 | return td_root_tg(td); | ||
461 | |||
462 | return blkg_to_tg(blkg_lookup(blkcg, td->queue)); | 455 | return blkg_to_tg(blkg_lookup(blkcg, td->queue)); |
463 | } | 456 | } |
464 | 457 | ||