Skip to content

Add queue_is_busy helper

Jens Axboe linux-block 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 10 repliesIn review
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Remember to check if the queue matches, otherwise we could be returning false positive for shared tag sets.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2blk-mq-tag: change busy_iter_fn to return whether to continue or notblock/blk-mq-debugfs.c block/blk-mq-tag.c block/blk-mq.c +1 more+18 -106 replies
2/2blk-mq: provide a helper to check if a queue is busyblock/blk-mq.c include/linux/blk-mq.h+28 -02 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMike SnitzerBart Van Assche
1/2R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCHSET v2 0/2] Add queue_is_busy helper

DM currently uses atomic inc/dec to maintain a busy count of IO on a given device. For the dm-mq path, we can replace this with helper that just checks the state of the tags on the device.

First patch is a prep patch that allows the iteration helpers to return true/false, like we support internally in sbitmap. For a busy check we don't care about how many requests are busy, just if some are or not. Hence we can stop iterating tags as soon as we find one that is allocated.

Changes since v1:

- Remember to check if the queue matches, otherwise we could be returning false positive for shared tag sets.

 block/blk-mq-debugfs.c |  4 +++-
 block/blk-mq-tag.c     |  4 ++--
 block/blk-mq.c         | 42 +++++++++++++++++++++++++++++++++++++-----
 include/linux/blk-mq.h |  6 ++++--
 4 files changed, 46 insertions(+), 10 deletions(-)
Signature · 1 line
Jens Axboe