[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ac77c07ecda8805a5f942f5c71b3a2ef0f9183ce.camel@infradead.org>
Date: Sat, 26 Apr 2025 09:30:50 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Andrew Morton <akpm@...ux-foundation.org>, Lorenzo Stoakes
<lorenzo.stoakes@...cle.com>
Cc: Mike Rapoport <rppt@...nel.org>, "Sauerwein, David"
<dssauerw@...zon.de>, Anshuman Khandual <anshuman.khandual@....com>, Ard
Biesheuvel <ardb@...nel.org>, Catalin Marinas <catalin.marinas@....com>,
David Hildenbrand <david@...hat.com>, Marc Zyngier <maz@...nel.org>, Mark
Rutland <mark.rutland@....com>, Mike Rapoport <rppt@...ux.ibm.com>, Will
Deacon <will@...nel.org>, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, Ruihan Li
<lrh2000@....edu.cn>
Subject: Re: [PATCH v4 7/7] mm/mm_init: Use for_each_valid_pfn() in
init_unavailable_range()
On Fri, 2025-04-25 at 16:38 -0700, Andrew Morton wrote:
> On Fri, 25 Apr 2025 17:11:10 +0100 Lorenzo Stoakes <lorenzo.stoakes@...cle.com> wrote:
>
> > Andrew - can we drop this from mm-new? It's breaking it.
>
> I almost did, but David seems to have a fix.
>
> --- a/include/linux/mmzone.h~mm-mm_init-use-for_each_valid_pfn-in-init_unavailable_range-fix
The symptoms only manifested when it got used in
init_unavailable_range() but that's actually a fix for the sparsemem
implementation of for_each_valid_pfn(), as David H surmised.
Please could the fix be folded into
mm-implement-for_each_valid_pfn-for-config_sparsemem.patch ?
This is what it should look like with the fix:
https://git.infradead.org/?p=users/dwmw2/linux.git;a=commitdiff;h=55bebbb093
If you want to keep the fix separate, then that's the patch that it
fixes. Do you want a commit message? I'll certainly give you a proper
SoB:
Signed-off-by: David Woodhouse <dwmw@...zon.co.uk>
Happy to resend the fixed series if it helps; it looks like you've
already basically sorted it though?
Thanks!
> +++ a/include/linux/mmzone.h
> @@ -2190,10 +2190,10 @@ static inline unsigned long next_valid_p
> /*
> * Either every PFN within the section (or subsection for VMEMMAP) is
> * valid, or none of them are. So there's no point repeating the check
> - * for every PFN; only call first_valid_pfn() the first time, and when
> - * crossing a (sub)section boundary (i.e. !(pfn & ~PFN_VALID_MASK)).
> + * for every PFN; only call first_valid_pfn() again when crossing a
> + * (sub)section boundary (i.e. !(pfn & ~PAGE_{SUB,}SECTION_MASK)).
> */
> - if (pfn & (IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP) ?
> + if (pfn & ~(IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP) ?
> PAGE_SUBSECTION_MASK : PAGE_SECTION_MASK))
> return pfn;
>
> _
>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5069 bytes)
Powered by blists - more mailing lists