Skip to content

Improve batched tag allocation

Jens Axboe linux-block 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sbitmap: add __sbitmap_queue_get_batch()include/linux/sbitmap.h lib/sbitmap.c+64 -00 replies
2/2block: improve batched tag allocationblock/blk-mq-tag.c block/blk-mq-tag.h block/blk-mq.c+54 -202 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCHSET 0/2] Improve batched tag allocation

Hi,

We can do better than implementing batch tag allocs as just repeated calls into sbitmap. Add a sbitmap helper to grab a batch all at once, and use that instead.

Testing with instrumentation added, we get very close to the full batch count. For NVMe, if I run with 32 batch submits, the actual success batch size is ~31 on average. This is close to ideal, as one hw queue will have a 63 tag size and hence we get 31 of 32 tags once every 1/32 alloc. This could be improved, but wasting the extra cycles in sbitmap to skip to the next index for that case doesn't seem worth it.

Signature · 1 line
Jens Axboe