From: Mike Kravetz <mike.kravetz@oracle.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>, akpm@linux-foundation.org
Cc: mhocko@kernel.org, guro@fb.com, corbet@lwn.net,
yaozhenguo1@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v3] hugetlb: Support node specified when using cma for gigantic hugepages
Date: Fri, 15 Oct 2021 15:22:05 -0700 [thread overview]
Message-ID: <3828f912-774b-1422-d84a-b41d221fa490@oracle.com> (raw)
In-Reply-To: <bb790775ca60bb8f4b26956bb3f6988f74e075c7.1634261144.git.baolin.wang@linux.alibaba.com>
On 10/14/21 7:03 PM, Baolin Wang wrote:
> Now the size of CMA area for gigantic hugepages runtime allocation is
> balanced for all online nodes, but we also want to specify the size of
> CMA per-node, or only one node in some cases, which are similar with
> patch [1].
>
> For example, on some multi-nodes systems, each node's memory can be
> different, allocating the same size of CMA for each node is not suitable
> for the low-memory nodes. Meanwhile some workloads like DPDK mentioned by
> Zhenguo in patch [1] only need hugepages in one node.
>
> On the other hand, we have some machines with multiple types of memory,
> like DRAM and PMEM (persistent memory). On this system, we may want to
> specify all the hugepages only on DRAM node, or specify the proportion
> of DRAM node and PMEM node, to tuning the performance of the workloads.
>
> Thus this patch adds node format for 'hugetlb_cma' parameter to support
> specifying the size of CMA per-node. An example is as follows:
>
> hugetlb_cma=0:5G,2:5G
>
> which means allocating 5G size of CMA area on node 0 and node 2
> respectively. And the users should use the node specific sysfs file to
> allocate the gigantic hugepages if specified the CMA size on that node.
>
> [1]
> https://lkml.kernel.org/r/20211005054729.86457-1-yaozhenguo1@gmail.com
>
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Thanks for all of your updates. This version looks good to me.
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
> ---
> Changes from v2:
> - Update the commit log.
> - Remove hugetlb_cma_nodes_allowed nodemask and related code.
> - Rebase on the current linux-next branch.
>
> Changes from v1:
> - Update the commit log.
> - Avoid changing the behavior for 'balanced' gigantic huge page pool
> allocations.
> - Catch the invalid node specified in hugetlb_cma_reserve().
> - Validate the size of CMA for each node in hugetlb_cma_reserve().
> ---
> Documentation/admin-guide/kernel-parameters.txt | 6 +-
> mm/hugetlb.c | 86 ++++++++++++++++++++++---
> 2 files changed, 81 insertions(+), 11 deletions(-)
--
Mike Kravetz
prev parent reply other threads:[~2021-10-15 22:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 2:03 [PATCH v3] hugetlb: Support node specified when using cma for gigantic hugepages Baolin Wang
2021-10-15 22:22 ` 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=3828f912-774b-1422-d84a-b41d221fa490@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=corbet@lwn.net \
--cc=guro@fb.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=yaozhenguo1@gmail.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;
as well as URLs for NNTP newsgroup(s).