blk-mq: fix dispatch waiter accounting for reserved tags
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | sbitmap: add __sbitmap_add_wait_queue()include/ lib/ | +27 | 0 replies | |
| 2/2 | blk-mq: fix dispatch waiter accounting for reserved tagsblock/ include/ | +14 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] blk-mq: fix dispatch waiter accounting for reserved tags
From: Henry Hu <[email protected]>
blk_mq_mark_tag_wait() may queue hctx->dispatch_wait on breserved_tags and increment that queue's ws_active. The wakeup path always decrements bitmap_tags.ws_active, though. So the reserved counter stays elevated and the regular counter can be decremented without a matching increment, which may cause later wakeups to be skipped.
This is reachable and commit 98b99e9412d0 made the waiter side pick the right queue but left the wakeup side hardcoded to bitmap_tags.
Henry Hu (2):
sbitmap: add __sbitmap_add_wait_queue()
blk-mq: fix dispatch waiter accounting for reserved tags
block/blk-mq.c | 33 +++++++++++++-------------------- include/linux/blk-mq.h | 2 +- include/linux/sbitmap.h | 9 ++++++++- lib/sbitmap.c | 23 +++++++++++++++++++---- 4 files changed, 41 insertions(+), 26 deletions(-)
base-commit: 3f2425f5b5bbbdd991ca9cdfd5502e68d8895998
Signature · 1 line
2.40.1