mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Arianna Avanzini <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
24f290466f
commit
85b6bc9db6
2 changed files with 3 additions and 7 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue