From: Andrew Morton <akpm@linux-foundation.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-mm@kvack.org, Muchun Song <muchun.song@linux.dev>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hugetlb: Ensure adequate CMA areas available for hugetlb_cma[]
Date: Fri, 9 Feb 2024 14:16:37 -0800 [thread overview]
Message-ID: <20240209141637.129e417747ef130255db620d@linux-foundation.org> (raw)
In-Reply-To: <20240209065036.1412670-1-anshuman.khandual@arm.com>
On Fri, 9 Feb 2024 12:20:36 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> HugeTLB CMA area array is being created for possible MAX_NUMNODES without
> ensuring corresponding MAX_CMA_AREAS support in CMA. Let's just warn for
> such scenarios indicating need for CONFIG_CMA_AREAS adjustment.
>
> ...
>
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -7750,6 +7750,13 @@ void __init hugetlb_cma_reserve(int order)
> }
>
> reserved = 0;
> +
> + /*
> + * There needs to be enough MAX_CMA_AREAS to accommodate
> + * MAX_NUMNODES heap areas being created here. Otherwise
> + * adjust CONFIG_CMA_AREAS as required.
> + */
> + VM_WARN_ON(MAX_CMA_AREAS < MAX_NUMNODES);
Could this simply be fixed up in Kconfig logic?
And I think this could be detected at compile-time? BUILD_BUG_ON()?
> for_each_online_node(nid) {
> int res;
> char name[CMA_MAX_NAME];
> --
> 2.25.1
next prev parent reply other threads:[~2024-02-09 22:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 6:50 Anshuman Khandual
2024-02-09 22:16 ` Andrew Morton [this message]
2024-02-12 2:06 ` Anshuman Khandual
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=20240209141637.129e417747ef130255db620d@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
/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