[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240215172233.06e9515adf7de9c58d1b5d91@linux-foundation.org>
Date: Thu, 15 Feb 2024 17:22:33 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: linux-mm@...ck.org, Muchun Song <muchun.song@...ux.dev>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mm/hugetlb: Ensure adequate CMA areas available for
hugetlb_cma[]
On Thu, 15 Feb 2024 10:04:05 +0530 Anshuman Khandual <anshuman.khandual@....com> wrote:
> HugeTLB CMA area array is being created for possible MAX_NUMNODES without
> ensuring corresponding MAX_CMA_AREAS support in CMA. This fails the build
> for such scenarios indicating need for CONFIG_CMA_AREAS adjustment.
>
> ...
>
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -7743,6 +7743,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.
> + */
> + BUILD_BUG_ON(MAX_CMA_AREAS < MAX_NUMNODES);
> for_each_online_node(nid) {
> int res;
This blew up my x86_64 allmodconfig build. I didn't check whether this
is because x86_64 kconfig is broken or because the test is bogus.
I won't be releasing a kernel which fails x86_64 allmodconfig.
So before adding a new assertion can we please first make a best effort
to implement the fixes which are required to prevent the new assertion
from triggering?
Powered by blists - more mailing lists