]> git.baikalelectronics.ru Git - kernel.git/commit
sbitmap: fix batched wait_cnt accounting
authorKeith Busch <kbusch@kernel.org>
Thu, 25 Aug 2022 14:53:12 +0000 (07:53 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Sep 2022 16:42:41 +0000 (10:42 -0600)
commit16ede66973c84f890c03584f79158dd5b2d725f5
treea021cb3e0dbe12dde89734f1c558e29b28758c18
parentddbfc34fcf5d0bc33b006b90c580c56edeb31068
sbitmap: fix batched wait_cnt accounting

Batched completions can clear multiple bits, but we're only decrementing
the wait_cnt by one each time. This can cause waiters to never be woken,
stalling IO. Use the batched count instead.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215679
Signed-off-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20220825145312.1217900-1-kbusch@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-tag.c
include/linux/sbitmap.h
lib/sbitmap.c