{
  "slug": "blk-mq-request-tag",
  "term": "blk-mq request tag",
  "aliases": [
    "blk-mq scheduler tag",
    "blk-mq driver tag"
  ],
  "definition": "A blk-mq request tag is an integer slot identifier used to manage a Linux block request in a scheduler or driver tag set.",
  "note": "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. [systor2013]\n\nLinux 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. [core] [header]\n\nblk_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. [core]\n\nFlush 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. [core]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "Tags identify request slots, not persistent data identities, and do not establish completion ordering.",
      "citationIds": [
        "blk-doc"
      ]
    },
    {
      "text": "The original scaling experiments used an immediately completing null device, not measured SSD media latency.",
      "citationIds": [
        "systor2013"
      ]
    }
  ],
  "related": [
    "blk-mq",
    "queue-depth",
    "io-scheduler"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-08",
  "citations": [
    {
      "id": "systor2013",
      "title": "Bjorling, Axboe, Nellans and Bonnet: Linux Block IO (SYSTOR 2013), sections 3.2.3 and 4; DOI 10.1145/2485732.2485740",
      "url": "https://kernel.dk/blk-mq.pdf",
      "accessed": "2026-11-08"
    },
    {
      "id": "core",
      "title": "Linux v6.16: blk-mq.c, request allocation, dispatch preparation and blk_mq_start_request",
      "url": "https://github.com/torvalds/linux/blob/v6.16/block/blk-mq.c",
      "accessed": "2026-11-08"
    },
    {
      "id": "header",
      "title": "Linux v6.16: blk-mq.h, request fields and scheduler/driver tag sets",
      "url": "https://github.com/torvalds/linux/blob/v6.16/include/linux/blk-mq.h",
      "accessed": "2026-11-08"
    },
    {
      "id": "blk-doc",
      "title": "Linux 6.16: Multi-Queue Block IO Queueing Mechanism",
      "url": "https://docs.kernel.org/6.16/block/blk-mq.html",
      "accessed": "2026-11-08"
    },
    {
      "id": "hesela",
      "title": "Hesela: Sharing an SSD: who pays for the slowdown?",
      "url": "https://hesela.com/analyses/ssd-fairness-shared-queues/",
      "accessed": "2026-11-08"
    }
  ],
  "provenance": [
    "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."
  ]
}
