lkml.org 
[lkml]   [2021]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] hugetlbfs: add hugepages_node kernel parameter
OK,  It's better to use a concise way to add this function.  I will
use a better way in the next version.

Andrew Morton <akpm@linux-foundation.org> 于2021年8月23日周一 上午6:19写道:
>
> On Fri, 20 Aug 2021 11:05:36 +0800 yaozhenguo <yaozhenguo1@gmail.com> 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 hugepags in one node. For example: DPDK needs hugepages
> > which is in the same node as NIC. if DPDK needs four hugepags of 1G
> > size in node1 and system has 16 numa nodes. We must reserve 64 hugepags
> > in kernel cmdline. But, only four hugepages is used. The others should
> > be free after boot.If the system memory is low(for example: 64G), it will
> > be an impossible task. So, add hugepages_node kernel parameter to specify
> > node number of hugepages to allocate at boot.
> > For example add following parameter:
> >
> > hugepagesz=1G hugepages_node=1 hugepages=4
> >
> > It will allocate 4 hugepags in node1 at boot.
>
> If were going to do this, shouldn't we permit more than one node?
>
> hugepages_nodes=1,2,5

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