mq-deadline
mq-deadline is a Linux block I/O scheduler that combines sector ordering with soft request-expiration goals for dispatch.
Requests enter sector-sorted and arrival-ordered lists, separated by direction and I/O-priority class. Expiration can select an older request over sector order. Batches, read preference and write-starvation control also affect selection. [1]
In Linux v6.16 the built-in defaults are a read_expire of HZ/2, which is 500 ms, a write_expire of 5 s, a prio_aging_expire of 10 s, a writes_starved value of 2 and a fifo_batch of 16 requests. Expiries are checked between batches. The tunable guide describes fifo_batch=1 as first-come first-served, but that is not a general property of the v6.16 selection code. [1] [3]
The expiration concerns starting service, not completing the request. It is a soft goal, so read_expire is not a bound on application read latency. Sorting and FIFO state are shared across hardware queues of the same request queue rather than independently replicated per hardware queue. [1]
With fifo_batch=1, sector selection and read preference remain. An unexpired later read can precede an earlier read at a higher sector. See the source-derived counterexample in the linked analysis; this is a dispatch rule, not measured completion order. [1]
Relations
Advantages
- A smaller fifo_batch reduces per-request latency variation, while a larger one generally improves aggregate throughput. [3]
- writes_starved limits consecutive read-preference decisions when writes are pending; it is not an elapsed-time bound for every write. [1, 3]
Limitations
- Setting front_merges to 0 disables only the rbtree front-sector lookup, so front merges can still occur through the cached last_merge hint. [3]
- The source defines expirations in jiffies derived from HZ, so their granularity follows the kernel tick rate. [1]
Citations
- Linux v6.16: mq-deadline.c, soft expirations and dd_dispatch_request
- Linux 6.16: Deadline IO scheduler tunables
Further reading
Sources & caveats
- deadline is the Linux v6.16 mq-deadline.c source, re-read on git.kernel.org at the same tag for the default constants and the shared hardware-queue state.
- deadline-doc is the Linux 6.16 deadline tunables page, read for the fifo_batch, writes_starved and front_merges semantics.
- The throughput-storage entry links here because fifo_batch trades per-request latency against aggregate throughput.
- 2026-11-08 correction: reconciled the tunable guide with v6.16 __dd_dispatch_request instead of treating the guide's FCFS shorthand as an invariant.