summaryrefslogtreecommitdiffstats
path: root/include/linux/pda_power.h
diff options
context:
space:
mode:
authorJens Axboe2018-11-30 01:36:41 +0100
committerJens Axboe2018-11-30 22:48:04 +0100
commit5d2ee7122c73be6a3b6bfe90d237e8aed737cfaa (patch)
treeada2bd06a0523a6ab8a9eae652034e2b0cb7b996 /include/linux/pda_power.h
parentsbitmap: ammortize cost of clearing bits (diff)
downloadkernel-qcow2-linux-5d2ee7122c73be6a3b6bfe90d237e8aed737cfaa.tar.gz
kernel-qcow2-linux-5d2ee7122c73be6a3b6bfe90d237e8aed737cfaa.tar.xz
kernel-qcow2-linux-5d2ee7122c73be6a3b6bfe90d237e8aed737cfaa.zip
sbitmap: optimize wakeup check
Even if we have no waiters on any of the sbitmap_queue wait states, we still have to loop every entry to check. We do this for every IO, so the cost adds up. Shift a bit of the cost to the slow path, when we actually have waiters. Wrap prepare_to_wait_exclusive() and finish_wait(), so we can maintain an internal count of how many are currently active. Then we can simply check this count in sbq_wake_ptr() and not have to loop if we don't have any sleepers. Convert the two users of sbitmap with waiting, blk-mq-tag and iSCSI. Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/pda_power.h')
0 files changed, 0 insertions, 0 deletions