Skip to content
Commit e8618575 authored by Jens Axboe's avatar Jens Axboe
Browse files

blk-mq: fix sbitmap ws_active for shared tags



We now wrap sbitmap waitqueues in an active counter, so we can avoid
iterating wakeups unless we have waiters there. This works as long as
everyone that's manipulating the waitqueues use the proper helpers. For
the tag wait case for shared tags, however, we add ourselves to the
waitqueue without incrementing/decrementing the ->ws_active count. This
means that wakeups can take a long time to happen.

Fix this by manually doing the inc/dec as needed for the wait queue
handling.

Reported-by: default avatarMichael Leun <kbug@newton.leun.net>
Tested-by: default avatarMichael Leun <kbug@newton.leun.net>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Fixes: 5d2ee712

 ("sbitmap: optimize wakeup check")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9e75ad5d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment