Skip to content

blk-mq: per-ctx tag caching

Jens Axboe linux-block 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 1 replyIn review
  2. v14 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6sbitmap: remove cleared bitmaskinclude/linux/sbitmap.h lib/sbitmap.c+10 -1030 replies
2/6sbitmap: add batch tag retrievalinclude/linux/sbitmap.h lib/sbitmap.c+118 -00 replies
3/6blk-mq: remove 'clear_ctx_on_error'block/blk-mq.c+1 -60 replies
4/6blk-mq: remove ctx->queueblock/blk-mq-sysfs.c block/blk-mq.c block/blk-mq.h+2 -50 replies
5/6blk-mq: add struct blk_mq_ctx_typeblock/blk-mq-debugfs.c block/blk-mq-sched.c block/blk-mq.c +1 more+21 -170 replies
6/6blk-mq: allocate tags in batchesblock/blk-mq-debugfs.c block/blk-mq-tag.c block/blk-mq-tag.h +3 more+144 -41 reply

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCHSET v2 0/6] blk-mq: per-ctx tag caching

Here's v2 of this patchset. It should be solid now, the previous version didn't handle tag flushing correctly, or multiple hardware queue types.

The idea here is that we can reduce the cost of getting a tag for a new request, if we don't get them piecemeal. Add a per-ctx tag cache, and grab batches of tags if it's empty. If it's not empty, we can just find a free bit there.

/sys/kernel/debug/block/<dev>/<hctx>/<cpu>/tag_hit holds some stats associated with this, so you can check how it's doing.

I've seen nice improvements with this in testing.

Signature · 1 line
Jens Axboe