linux-stable/Documentation/admin-guide/mm
Zhenguo Yao b5389086ad hugetlbfs: extend the definition of hugepages parameter to support node allocation
We can specify the number of hugepages to allocate at boot.  But the
hugepages is balanced in all nodes at present.  In some scenarios, we
only need hugepages in one node.  For example: DPDK needs hugepages
which are in the same node as NIC.

If DPDK needs four hugepages of 1G size in node1 and system has 16 numa
nodes we must reserve 64 hugepages on the kernel cmdline.  But only four
hugepages are used.  The others should be free after boot.  If the
system memory is low(for example: 64G), it will be an impossible task.

So extend the hugepages parameter to support specifying hugepages on a
specific node.  For example add following parameter:

  hugepagesz=1G hugepages=0:1,1:3

It will allocate 1 hugepage in node0 and 3 hugepages in node1.

Link: https://lkml.kernel.org/r/20211005054729.86457-1-yaozhenguo1@gmail.com
Signed-off-by: Zhenguo Yao <yaozhenguo1@gmail.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Zhenguo Yao <yaozhenguo1@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-11-06 13:30:41 -07:00
..
damon Documentation: add documents for DAMON 2021-09-08 11:50:25 -07:00
cma_debugfs.rst docs: admin-guide: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
concepts.rst docs/mm: concepts.rst: Correct the threshold to low watermark 2020-12-31 15:47:34 -07:00
hugetlbpage.rst hugetlbfs: extend the definition of hugepages parameter to support node allocation 2021-11-06 13:30:41 -07:00
idle_page_tracking.rst tools/vm/page-types.c: add support for idle page tracking 2018-08-17 16:20:28 -07:00
index.rst Documentation: add documents for DAMON 2021-09-08 11:50:25 -07:00
ksm.rst Replace HTTP links with HTTPS ones: Documentation/admin-guide 2020-07-05 14:13:00 -06:00
memory-hotplug.rst memory-hotplug.rst: complete admin-guide overhaul 2021-09-08 11:50:22 -07:00
nommu-mmap.rst docs: move nommu-mmap.txt to admin-guide and rename to ReST 2020-06-26 11:33:35 -06:00
numa_memory_policy.rst mm/mempolicy: advertise new MPOL_PREFERRED_MANY 2021-09-03 09:58:17 -07:00
numaperf.rst Documentation: Add leading slash to some paths 2021-03-31 13:49:19 -06:00
pagemap.rst Documentation: update pagemap with shmem exceptions 2021-11-06 13:30:36 -07:00
soft-dirty.rst
transhuge.rst mm/page_alloc: combine __alloc_pages and __alloc_pages_nodemask 2021-04-30 11:20:42 -07:00
userfaultfd.rst userfaultfd/shmem: advertise shmem minor fault support 2021-06-30 20:47:27 -07:00