[PATCH -next v2 0/2] block, bfq: make bfq_has_work() more accurate

Yu Kuai posted 2 patches 3 years, 11 months ago
block/bfq-iosched.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
[PATCH -next v2 0/2] block, bfq: make bfq_has_work() more accurate
Posted by Yu Kuai 3 years, 11 months ago
Changes in v2:
 - add reviewed-by tag for patch 1
 - use WRITE_ONCE() for updating of 'bfqd->queued' in patch 2

This patchset try to make bfq_has_work() more accurate, patch 1 is a
small problem found by code review.

BTW, I not sure why blk_mq_run_hw_queues() is called with 'bfqd->lock'
held, I think this is not necessary. And bfq_has_work() can be more
accurate by reading 'bfqd->queued' with 'bfqd->lock' held after patch 2.

Previous versions:
v1: https://lore.kernel.org/all/20220510131629.1964415-1-yukuai3@huawei.com/

Yu Kuai (2):
  block, bfq: protect 'bfqd->queued' by 'bfqd->lock'
  block, bfq: make bfq_has_work() more accurate

 block/bfq-iosched.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

-- 
2.31.1
Re: [PATCH -next v2 0/2] block, bfq: make bfq_has_work() more accurate
Posted by Jens Axboe 3 years, 11 months ago
On Fri, 13 May 2022 10:35:05 +0800, Yu Kuai wrote:
> Changes in v2:
>  - add reviewed-by tag for patch 1
>  - use WRITE_ONCE() for updating of 'bfqd->queued' in patch 2
> 
> This patchset try to make bfq_has_work() more accurate, patch 1 is a
> small problem found by code review.
> 
> [...]

Applied, thanks!

[1/2] block, bfq: protect 'bfqd->queued' by 'bfqd->lock'
      commit: 181490d5321806e537dc5386db5ea640b826bf78
[2/2] block, bfq: make bfq_has_work() more accurate
      commit: ddc25c86b466d2359b57bc7798f167baa1735a44

Best regards,
-- 
Jens Axboe