summaryrefslogtreecommitdiff
path: root/lib/sbitmap.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-03-25 21:34:10 +0300
committerJens Axboe <axboe@kernel.dk>2019-03-25 22:05:47 +0300
commite861857545567adec8da3bdff728efdf7db12285 (patch)
tree71572b52d87ba2421159bf6ee70c85708878be44 /lib/sbitmap.c
parent9e75ad5d8f399a21c86271571aa630dd080223e2 (diff)
downloadlinux-e861857545567adec8da3bdff728efdf7db12285.tar.xz
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: Michael Leun <kbug@newton.leun.net> Tested-by: Michael Leun <kbug@newton.leun.net> Cc: stable@vger.kernel.org Reviewed-by: Omar Sandoval <osandov@fb.com> Fixes: 5d2ee7122c73 ("sbitmap: optimize wakeup check") Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/sbitmap.c')
0 files changed, 0 insertions, 0 deletions