summaryrefslogtreecommitdiffstats
path: root/include/linux/iversion.h
diff options
context:
space:
mode:
authorJens Axboe2018-11-30 21:18:06 +0100
committerJens Axboe2018-11-30 22:47:45 +0100
commitea86ea2cdced20057da4d2c32965c1219c238197 (patch)
tree08926009b00df1229668f131d41d2b467a78cc87 /include/linux/iversion.h
parentblock: avoid extra bio reference for async O_DIRECT (diff)
downloadkernel-qcow2-linux-ea86ea2cdced20057da4d2c32965c1219c238197.tar.gz
kernel-qcow2-linux-ea86ea2cdced20057da4d2c32965c1219c238197.tar.xz
kernel-qcow2-linux-ea86ea2cdced20057da4d2c32965c1219c238197.zip
sbitmap: ammortize cost of clearing bits
sbitmap maintains a set of words that we use to set and clear bits, with each bit representing a tag for blk-mq. Even though we spread the bits out and maintain a hint cache, one particular bit allocated will end up being cleared in the exact same spot. This introduces batched clearing of bits. Instead of clearing a given bit, the same bit is set in a cleared/free mask instead. If we fail allocating a bit from a given word, then we check the free mask, and batch move those cleared bits at that time. This trades 64 atomic bitops for 2 cmpxchg(). In a threaded poll test case, half the overhead of getting and clearing tags is removed with this change. On another poll test case with a single thread, performance is unchanged. Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/iversion.h')
0 files changed, 0 insertions, 0 deletions