nvme: allow user toggling hmb usage
authorKeith Busch <kbusch@kernel.org>
Tue, 27 Jul 2021 16:40:43 +0000 (09:40 -0700)
committerChristoph Hellwig <hch@lst.de>
Mon, 16 Aug 2021 12:42:24 +0000 (14:42 +0200)
commita5df5e79c43c84d9fb88f56b707c5ff52b27ccca
tree8769761917dc7120f3b51f33dc8cb14c7a100132
parente5ad96f388b765fe6b52f64f37e910c0ba4f3de7
nvme: allow user toggling hmb usage

The NVMe host memory buffer may consume a non-negligable amount of
memory. Controllers are required to function without the host memory
buffer enabled, but with possibly degraded performance. Export a sysfs
property to toggle this feature on a per-device granularity so users may
choose to reclaim memory at the expense of storage performance.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c