controller-memory-buffer · shipping · also CMB

Controller Memory Buffer (CMB)

Controller Memory Buffer is an optional NVMe mechanism that exposes controller-resident memory for host use through PCIe.

The controller advertises supported uses, which may include queues, descriptors or transfer data. HMB instead assigns host memory to the controller. CMB is not a synonym for an SSD's private DRAM cache. [1]

The CMBSZ register at offset 3Ch reports a 20-bit size in units from 4 KiB to 64 GiB, each 16 times the previous one. Five flags cover submission queues, completion queues, PRP or SGL lists, read data and write data. If offset plus size exceeds the PCIe BAR, the usable size is limited by the BAR length. [1]

Contents are undefined after a controller reset, a function level reset or enabling the controller memory space, so host software initializes the buffer before use. A submission queue placed there lets the host write whole commands into controller memory and saves one controller read across PCIe. [1]

The Linux v6.16 PCIe driver computes the unit as 2^(12+4*SZU) bytes and places I/O submission queues in the buffer by default when the queue flag is set. It shrinks queue depth to fit and falls back to host memory below 64 entries. [3]

Relations

related
Host memory buffer (HMB), NVMe, PCIe storage attachment, SSD DRAM cache, NVMe Persistent Memory Region (PMR)

Advantages

  • Supported queue and descriptor placement can avoid fetching these structures from host memory. [1]
  • For small writes the host can place data directly in controller memory instead of having the controller fetch it. [1]

Limitations

  • Available uses depend on controller capability flags; CMB does not itself establish persistent-memory or power-loss-protection guarantees. [1]
  • The Linux driver offers the buffer for peer-to-peer DMA only when both read and write data flags are set, and skips it when size or BAR start is misaligned. [3]

Citations

  1. NVM Express 1.4a (9 March 2020), sections 4.7 and 4.8: CMB and PMR. Copyright 2007-2020 NVM Express, Inc. (accessed 2026-10-22)
  2. Linux v6.16 drivers/nvme/host/pci.c: CMB mapping, size units and submission-queue placement (accessed 2026-10-22)

Further reading

  1. Hesela: Host Memory Buffer (HMB). (accessed 2026-10-18)
Sources & caveats
  • nvme is NVM Express 1.4a, reread on the access date in section 3.1.12 (CMBSZ) and section 4.7.
  • linux-pci is drivers/nvme/host/pci.c at tag v6.16, read in nvme_map_cmb, nvme_cmb_size_unit, nvme_cmb_qdepth and nvme_alloc_sq_cmds.
  • 3Ch, 20 bits, 4 KiB, 64 GiB, 16 times and five flags come from nvme. 2^(12+4*SZU) and 64 entries come from linux-pci.

JSON: /data/terms/controller-memory-buffer.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Controller Memory Buffer (CMB). Hesela. 2026-10-28. https://hesela.dev/terms/controller-memory-buffer/