blk-mq-request-tag · shipping · also blk-mq scheduler tag, blk-mq driver tag

blk-mq request tag

A blk-mq request tag is an integer slot identifier used to manage a Linux block request in a scheduler or driver tag set.

Tag-based completion maps a returned identifier to a request without scanning the outstanding-request list. The 2013 multi-queue paper motivates sharing this identifier across the block layer and driver to avoid redundant tracking. [1]

Linux v6.16 separates scheduler and driver tag sets. With an I/O scheduler, allocation fills internal_tag and leaves tag at BLK_MQ_NO_TAG; dispatch preparation later acquires a driver tag. Without a scheduler, allocation already fills tag and leaves internal_tag unset. A driver tag alone therefore does not prove hardware submission. [2] [3]

blk_mq_start_request emits the issue tracepoint, starts the request timer and sets MQ_RQ_IN_FLIGHT. Waiting for allocation or dispatch is not necessarily covered by that timer. For diagnosis, record the tag set, queue context and lifecycle event rather than treating every allocated request as device service time. [2]

Flush and passthrough requests can use scheduler tags while bypassing normal scheduler policy. RQF_SCHED_TAGS and RQF_USE_SCHED describe different properties; a scheduler-tagged request need not have been sorted by that scheduler. [2]

Relations

related
Linux blk-mq, Queue depth, I/O scheduler

Limitations

  • Tags identify request slots, not persistent data identities, and do not establish completion ordering. [4]
  • The original scaling experiments used an immediately completing null device, not measured SSD media latency. [1]

Citations

  1. Bjorling, Axboe, Nellans and Bonnet: Linux Block IO (SYSTOR 2013), sections 3.2.3 and 4; DOI 10.1145/2485732.2485740 (accessed 2026-11-08)
  2. Linux v6.16: blk-mq.c, request allocation, dispatch preparation and blk_mq_start_request (accessed 2026-11-08)
  3. Linux v6.16: blk-mq.h, request fields and scheduler/driver tag sets (accessed 2026-11-08)
  4. Linux 6.16: Multi-Queue Block IO Queueing Mechanism (accessed 2026-11-08)

Further reading

  1. Hesela: Sharing an SSD: who pays for the slowdown? (accessed 2026-11-08)
Sources & caveats
  • Source-code interpretation is pinned to Linux v6.16, not a claim about every kernel release or driver.
  • The header's dispatch-time description is read together with blk_mq_rq_ctx_init, which assigns the driver tag at allocation when RQF_SCHED_TAGS is absent.
  • The SYSTOR paper explains the historical design and experimental method; no paper replication or physical-device benchmark is reported.

JSON: /data/terms/blk-mq-request-tag.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. blk-mq request tag. Hesela. 2026-11-08. https://hesela.dev/terms/blk-mq-request-tag/