lkml.org 
[lkml]   [2021]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8] hugetlbfs: Extend the definition of hugepages parameter to support node allocation
From
Date
On 10/4/21 10:47 PM, Zhenguo Yao wrote:
> 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.
>
> Signed-off-by: Zhenguo Yao <yaozhenguo1@gmail.com>
> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>

Looks good. Thank you!
--
Mike Kravetz

\
 
 \ /
  Last update: 2021-10-06 01:01    [W:0.066 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site