linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Zhenguo Yao <yaozhenguo1@gmail.com>, akpm@linux-foundation.org
Cc: dan.carpenter@oracle.com, nathan@kernel.org, mpe@ellerman.id.au,
	benh@kernel.crashing.org, paulus@samba.org, corbet@lwn.net,
	rppt@kernel.org, yaozhenguo@jd.com, willy@infradead.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH v8] hugetlbfs: Extend the definition of hugepages parameter to support node allocation
Date: Tue, 5 Oct 2021 15:59:48 -0700	[thread overview]
Message-ID: <55d28037-4e0e-70b3-717d-a44b90f6f9ef@oracle.com> (raw)
In-Reply-To: <20211005054729.86457-1-yaozhenguo1@gmail.com>

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


      reply	other threads:[~2021-10-05 23:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05  5:47 Zhenguo Yao
2021-10-05 22:59 ` Mike Kravetz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55d28037-4e0e-70b3-717d-a44b90f6f9ef@oracle.com \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=corbet@lwn.net \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpe@ellerman.id.au \
    --cc=nathan@kernel.org \
    --cc=paulus@samba.org \
    --cc=rppt@kernel.org \
    --cc=willy@infradead.org \
    --cc=yaozhenguo1@gmail.com \
    --cc=yaozhenguo@jd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox