Re: [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Mike Rapoport <rppt@xxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order
- From: Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx>
- Date: Thu, 7 May 2020 21:21:03 +0000
- Accept-language: en-US
- Cc: Rich Felker <dalias@xxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "linux-doc@xxxxxxxxxxxxxxx" <linux-doc@xxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, "linux-csky@xxxxxxxxxxxxxxx" <linux-csky@xxxxxxxxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "linux-riscv@xxxxxxxxxxxxxxxxxxx" <linux-riscv@xxxxxxxxxxxxxxxxxxx>, Greg Ungerer <gerg@xxxxxxxxxxxxxx>, "linux-arch@xxxxxxxxxxxxxxx" <linux-arch@xxxxxxxxxxxxxxx>, "linux-s390@xxxxxxxxxxxxxxx" <linux-s390@xxxxxxxxxxxxxxx>, "linux-c6x-dev@xxxxxxxxxxxxx" <linux-c6x-dev@xxxxxxxxxxxxx>, Baoquan He <bhe@xxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, "linux-sh@xxxxxxxxxxxxxxx" <linux-sh@xxxxxxxxxxxxxxx>, "linux-hexagon@xxxxxxxxxxxxxxx" <linux-hexagon@xxxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Ley Foon Tan <ley.foon.tan@xxxxxxxxx>, "Geert Uytterhoeven" <geert@xxxxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>
- In-reply-to: <20200507205900.GH683243@linux.ibm.com>
- References: <20200429121126.17989-1-rppt@kernel.org> <20200429121126.17989-18-rppt@kernel.org> <20200503174138.GA114085@roeck-us.net> <20200503184300.GA154219@roeck-us.net> <20200504153901.GM14260@kernel.org> <a0b20e15-fddb-aa9c-fd67-f1c8e735b4a4@synopsys.com> <20200505091946.GG342687@linux.ibm.com> <88b9465b-6e6d-86ca-3776-ccb7a5b60b7f@synopsys.com> <20200505201522.GA683243@linux.ibm.com> <20200507205900.GH683243@linux.ibm.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0
On 5/7/20 1:59 PM, Mike Rapoport wrote:
> On Tue, May 05, 2020 at 11:15:22PM +0300, Mike Rapoport wrote:
>> On Tue, May 05, 2020 at 06:07:46PM +0000, Vineet Gupta wrote:
>>> On 5/5/20 2:19 AM, Mike Rapoport wrote:
>>> - Is it not better to have the core retain the flexibility just in case
>> If the requirement to have support for 3-banks is a theoretical
>> possibility, I would prefer to adjust ARC's version of
>> arch_has_descending_max_zone_pfns() to cope with either of 2-banks
>> configuration (PAE40 and non-PAE40) and deal with the third bank when/if
>> it actually materializes.
Fair enough.
> The fix below should take care of any 2-bank configurations.
> This is vs. current mmotm.
>
> From eb8124fb3584607d1036b7ae00c8092ae43e480d Mon Sep 17 00:00:00 2001
> From: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> Date: Thu, 7 May 2020 23:44:15 +0300
> Subject: [PATCH] arc: free_area_init(): take into account PAE40 mode
>
> The arch_has_descending_max_zone_pfns() does not take into account physical
> memory layout for PAE40 configuration.
> With PAE40 enabled, the HIGHMEM is actually higher than NORMAL and
> arch_has_descending_max_zone_pfns() should return false in this case.
>
> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
LGTM.
Acked-by: Vineet Gupta <vgupta@xxxxxxxxxxxx>
Thx,
> ---
> arch/arc/mm/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
> index 386959bac3d2..e7bdc2ac1c87 100644
> --- a/arch/arc/mm/init.c
> +++ b/arch/arc/mm/init.c
> @@ -79,7 +79,7 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
>
> bool arch_has_descending_max_zone_pfns(void)
> {
> - return true;
> + return !IS_ENABLED(CONFIG_ARC_HAS_PAE40);
> }
>
> /*
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]