cfq-iosched: move cfq_group determination from cfq_find_alloc_queue() to cfq_get_queue()
authorTejun Heo <tj@kernel.org>
Tue, 18 Aug 2015 21:55:03 +0000 (14:55 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 18 Aug 2015 22:49:16 +0000 (15:49 -0700)
commit322731ed0dd2d8a7f11307e0444257f48580a0de
tree536ae950d92b337f3896cb37acc8d3bf5c05ac14
parent2da8de0bb799bf2bdfa893e5a1e294eb6bafba62
cfq-iosched: move cfq_group determination from cfq_find_alloc_queue() to cfq_get_queue()

This is necessary for making async cfq_cgroups per-cfq_group instead
of per-cfq_data.  While this change makes cfq_get_queue() perform RCU
locking and look up cfq_group even when it reuses async queue, the
extra overhead is extremely unlikely to be noticeable given that this
is already sitting behind cic->cfqq[] cache and the overall cost of
cfq operation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/cfq-iosched.c