Re: [PATCH 7/9] mm: Calc the right pfn if page size is not 4K
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Wupeng Ma <mawupeng1@xxxxxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx, corbet@xxxxxxx
- Subject: Re: [PATCH 7/9] mm: Calc the right pfn if page size is not 4K
- From: David Hildenbrand <david@xxxxxxxxxx>
- Date: Mon, 28 Mar 2022 14:33:44 +0200
- Cc: ardb@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, dvhart@xxxxxxxxxxxxx, andy@xxxxxxxxxxxxx, rppt@xxxxxxxxxx, paulmck@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, jroedel@xxxxxxx, songmuchun@xxxxxxxxxxxxx, macro@xxxxxxxxxxx, frederic@xxxxxxxxxx, W_Armin@xxxxxx, john.garry@xxxxxxxxxx, seanjc@xxxxxxxxxx, tsbogend@xxxxxxxxxxxxxxxx, anshuman.khandual@xxxxxxx, chenhuacai@xxxxxxxxxx, gpiccoli@xxxxxxxxxx, mark.rutland@xxxxxxx, wangkefeng.wang@xxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- In-reply-to: <20220326064632.131637-8-mawupeng1@huawei.com>
- Organization: Red Hat
- References: <20220326064632.131637-1-mawupeng1@huawei.com> <20220326064632.131637-8-mawupeng1@huawei.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2
On 26.03.22 07:46, Wupeng Ma wrote:
> From: Ma Wupeng <mawupeng1@xxxxxxxxxx>
>
> Pervious 0x100000 is used to check the 4G limit in
s/Pervious/Previous/
> find_zone_movable_pfns_for_nodes(). This is right in x86 because
> the page size can only be 4K. But 16K and 64K are available in
> arm64. So replate it with SIZE_4G >> PAGE_SHIFT.
s/replate/replace/
>
> Signed-off-by: Ma Wupeng <mawupeng1@xxxxxxxxxx>
> ---
> mm/page_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6e0b4596cde9..41fd987b5b93 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -7811,7 +7811,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 < (SZ_4G >> PAGE_SHIFT)) {
PHYS_PFN(SZ_4G)
?
> mem_below_4gb_not_mirrored = true;
> continue;
> }
--
Thanks,
David / dhildenb
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]