]> git.baikalelectronics.ru Git - kernel.git/commit
blk-throttle: Move service tree validation out of the throtl_rb_first()
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Thu, 8 Oct 2020 03:52:27 +0000 (11:52 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Oct 2020 14:01:38 +0000 (08:01 -0600)
commit7830b40e298904586bd675220c9334052b0b8383
tree860f4f541bbfaa27643a098bdc190422ea4814cb
parentc9edba0bb972a6622827c6a8c3d03bb2202ef20a
blk-throttle: Move service tree validation out of the throtl_rb_first()

The throtl_schedule_next_dispatch() will validate if the service queue
is empty before calling update_min_dispatch_time(), and the
update_min_dispatch_time() will call throtl_rb_first(), which will
validate service queue again.

Thus we can move the service queue validation out of the
throtl_rb_first() to remove the redundant validation in the fast path.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c