Skip to content

Commit

Permalink
block: don't bloat enter_queue with percpu_ref
Browse files Browse the repository at this point in the history
percpu_ref_put() are inlined for performance and bloat the binary, we
don't care about the fail case of blk_try_enter_queue(), so we can
replace it with a call to blk_queue_exit().

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Oct 20, 2021
1 parent 478eb72 commit 1497a51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ static bool blk_try_enter_queue(struct request_queue *q, bool pm)
return true;

fail_put:
percpu_ref_put(&q->q_usage_counter);
blk_queue_exit(q);
fail:
rcu_read_unlock();
return false;
Expand Down

0 comments on commit 1497a51

Please sign in to comment.