From: huhai <15815827059@163.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, shikemeng@huaweicloud.com,
Henry Hu <huhai@kylinos.cn>
Subject: [PATCH 0/2] blk-mq: fix dispatch waiter accounting for reserved tags
Date: Sun, 20 Sep 2026 18:11:30 +0800 [thread overview]
Message-ID: <cover.1789890726.git.huhai@kylinos.cn> (raw)
From: Henry Hu <huhai@kylinos.cn>
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
--
2.40.1
next reply other threads:[~2026-09-20 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 10:11 huhai [this message]
2026-09-20 10:11 ` [PATCH 1/2] sbitmap: add __sbitmap_add_wait_queue() huhai
2026-09-20 10:11 ` [PATCH 2/2] blk-mq: fix dispatch waiter accounting for reserved tags huhai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1789890726.git.huhai@kylinos.cn \
--to=15815827059@163.com \
--cc=axboe@kernel.dk \
--cc=huhai@kylinos.cn \
--cc=linux-block@vger.kernel.org \
--cc=shikemeng@huaweicloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox