Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-07-05 Thread Jia He
Hi Pavel, sorry for the late reply On 6/30/2018 1:07 AM, Pavel Tatashin Wrote: > On Thu, Jun 28, 2018 at 10:30 PM Jia He wrote: >> >> Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns >> where possible") optimized the loop in memmap_init_zone(). But it causes >> possible p

Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-07-02 Thread Pavel Tatashin
Can you put it into memblock.c > Do you think it looks ok if I add the inline prefix? I would say no, this function is a too complex, and is not in some critical path to be always inlined. I would put it into memblock.c, and have #ifdef CONFIG_HAVE_MEMBLOCK_PFN_VALID around it. Thank you, Pave

Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-07-02 Thread Jia He
Hi, Pavel Thanks for the comments. On 6/30/2018 2:13 AM, Pavel Tatashin Wrote: >> +++ b/include/linux/early_pfn.h >> @@ -0,0 +1,34 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ >> +/* Copyright (C) 2018 HXT-semitech Corp. */ >> +#ifndef __EARLY_PFN_H >> +#define __EARLY_PFN_H >> +#ifdef CONFIG_HAV

Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-07-02 Thread Michal Hocko
On Fri 29-06-18 14:13:08, Pavel Tatashin wrote: > > +++ b/include/linux/early_pfn.h > > @@ -0,0 +1,34 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +/* Copyright (C) 2018 HXT-semitech Corp. */ > > +#ifndef __EARLY_PFN_H > > +#define __EARLY_PFN_H > > +#ifdef CONFIG_HAVE_MEMBLOCK_PFN_VALID > >

Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-06-29 Thread Pavel Tatashin
> +++ b/include/linux/early_pfn.h > @@ -0,0 +1,34 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright (C) 2018 HXT-semitech Corp. */ > +#ifndef __EARLY_PFN_H > +#define __EARLY_PFN_H > +#ifdef CONFIG_HAVE_MEMBLOCK_PFN_VALID > +ulong __init_memblock memblock_next_valid_pfn(ulong pfn) > +{ >

Re: [PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-06-29 Thread Pavel Tatashin
On Thu, Jun 28, 2018 at 10:30 PM Jia He wrote: > > Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns > where possible") optimized the loop in memmap_init_zone(). But it causes > possible panic bug. So Daniel Vacek reverted it later. > > But as suggested by Daniel Vacek, it is

[PATCH v9 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-06-28 Thread Jia He
Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But it causes possible panic bug. So Daniel Vacek reverted it later. But as suggested by Daniel Vacek, it is fine to using memblock to skip gaps and finding next valid