From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Date: Wed, 20 Apr 2022 22:27:49 +0000 Subject: Re: [PATCH v2 7/9] mm: Calc the right pfn if page size is not 4K Message-Id: <20220420152749.d41097e7d53ccd6a2a2aea5f@linux-foundation.org> List-Id: References: <20220414101314.1250667-1-mawupeng1@huawei.com> <20220414101314.1250667-8-mawupeng1@huawei.com> <672ff459-81bd-38ef-882d-e718992d295c@arm.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Ard Biesheuvel Cc: Anshuman Khandual , Wupeng Ma , Catalin Marinas , Will Deacon , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , X86 ML , hpa@zyccr.com, Darren Hart , Andy Shevchenko , Mike Rapoport , "Paul E. McKenney" , Peter Zijlstra , Joerg Roedel , songmuchun@bytedance.com, macro@orcam.me.uk, Frederic Weisbecker , W_Armin@gmx.de, John Garry , Sean Christopherson , Thomas Bogendoerfer , chenhuacai@kernel.org, David Hildenbrand , gpiccoli@igalia.com, Mark Rutland , Kefeng Wang , Linux Doc Mailing List , Linux Kernel Mailing List , Linux ARM , linux-efi , linux-ia64@vger.kernel.org, platform-driver-x86@vger.kernel.org, Linux Memory Management List On Tue, 19 Apr 2022 20:29:27 +0200 Ard Biesheuvel wrote: > > > --- a/mm/page_alloc.c > > > +++ b/mm/page_alloc.c > > > @@ -7870,7 +7870,7 @@ static void __init find_zone_movable_pfns_for_nodes(void) > > > > > > usable_startpfn = memblock_region_memory_base_pfn(r); > > > > > > - if (usable_startpfn < 0x100000) { > > > + if (usable_startpfn < PHYS_PFN(SZ_4G)) { > > > mem_below_4gb_not_mirrored = true; > > > continue; > > > } > > > > Regardless PFN value should never be encoded directly. > > > > Reviewed-by: Anshuman Khandual > > Acked-by: Ard Biesheuvel > > Andrew, can you please take this one through the -mm tree? The rest of > the series needs a bit more work, but is an obvious fix and there is > no point in holding it up. Sure. I'm not seeing any description of the runtime effects of this shortcoming. I tentatively queued the fix for 5.18, without a cc:stable for backporting. But that might not be the best decision?