nvme-cli: Support for hugetlbfs
Keith Busch
maintainerRFC 1/1 nvme-cli: Support for hugetlbfs
Some commands require exceptionally large data transfers, and the kernel driver supports only a limited number of phyiscal segments per command. To help support large transfers, try to allocate physically contiguous space via hugetlbfs.
Rather than deal with the nuances of allocating huge pages, this patch requires libhugetlbfs be installed on the host system.
--- Makefile | 7 ++++++ nvme.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 73 insertions(+), 7 deletions(-)
Makefile +7 -0
@@ -2,6 +2,7 @@ CFLAGS ?= -O2 -g -Wall -Werror override CFLAGS += -std=gnu99 -I. override CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__ LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?) +LIBHUGETLBFS = $(shell $(LD) -o /dev/null -lhugetlbfs >/dev/null 2>&1; echo $$?) HAVE_SYSTEMD = $(shell pkg-config --exists systemd --atleast-version=232; echo $$?) NVME = nvme INSTALL ?= install
@@ -21,6 +22,12 @@ ifeq ($(LIBUUID),0) override LIB_DEPENDS += uuid endif +ifeq ($(LIBHUGETLBFS),0) + override LDFLAGS += -lhugetlbfs + override CFLAGS += -DLIBHUGETLBFS + override LIB_DEPENDS += hugetlbfs +endif + INC=-Iutil ifeq ($(HAVE_SYSTEMD),0)
nvme.c +66 -7
143 lines not on this page · raw message
Signature · 7 lines
2.21.0 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Thanks Keith, this very useful, looks good.
Quoted 10 lines · Keith Busch
Some commands require exceptionally large data transfers, and the kernel driver supports only a limited number of phyiscal segments per command. To help support large transfers, try to allocate physically contiguous space via hugetlbfs.
Rather than deal with the nuances of allocating huge pages, this patch requires libhugetlbfs be installed on the host system.
Signed-off-by Keith Busch<[email protected]>---
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keith Busch
maintainerThanks for the reviews! I've gone ahead and pushed this to master.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 7 lines · Keith Busch
Some commands require exceptionally large data transfers, and the kernel driver supports only a limited number of phyiscal segments per command. To help support large transfers, try to allocate physically contiguous space via hugetlbfs.
Rather than deal with the nuances of allocating huge pages, this patch requires libhugetlbfs be installed on the host system.
LGTM, and solves a real issue with user issued admin commands that we can't break up.
Signature · 7 lines
Jens Axboe _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme