Skip to content

Commit 8842f63

Browse files
committed
doc: add note about huge TLB when using fw-download
Add a comment why fw-download is depending on huge TBL and what do to when the allocation fails. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 42f3398 commit 8842f63

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Documentation/nvme-fw-download.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ Download command. It is applied following a reset, where the image to
3636
apply and the firmware slot it should be committed to is specified with
3737
the Firmware Commit command (nvme fw-commit <args>).
3838

39+
Note: nvme-cli must allocate a contiguous (linear) memory buffer and map
40+
the firmware binary into it. To do this, nvme-cli first attempts to
41+
allocate the buffer using huge TLB pages. If allocation using huge pages
42+
fails, it falls back to using posix_memalign() combined with madvise(),
43+
though this is also likely to fail.
44+
45+
To increase the likelihood of success, you may want to pre-allocate a
46+
number of huge pages before initiating the firmware download:
47+
48+
echo 20 > /proc/sys/vm/nr_hugepages
49+
50+
For more details, refer to:
51+
https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
52+
3953
OPTIONS
4054
-------
4155
-f <firmware-file>::

0 commit comments

Comments
 (0)