Re: [PATCH v3 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-29 Thread Jia He
On 3/30/2018 9:43 AM, Wei Yang Wrote: On Thu, Mar 29, 2018 at 04:06:38PM +0800, Jia He wrote: On 3/28/2018 5:26 PM, Wei Yang Wrote: On Sun, Mar 25, 2018 at 08:02:16PM -0700, Jia He wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the

Re: [PATCH v3 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-29 Thread Wei Yang
On Thu, Mar 29, 2018 at 04:06:38PM +0800, Jia He wrote: > > >On 3/28/2018 5:26 PM, Wei Yang Wrote: >> On Sun, Mar 25, 2018 at 08:02:16PM -0700, Jia He wrote: >> > Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns >> > where possible") optimized the loop in memmap_init_zone().

Re: [PATCH v3 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-29 Thread Jia He
On 3/28/2018 5:26 PM, Wei Yang Wrote: On Sun, Mar 25, 2018 at 08:02:16PM -0700, Jia He wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But there is still some room for improvement. E.g. if pfn and pfn+1 a

Re: [PATCH v3 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-28 Thread Wei Yang
On Sun, Mar 25, 2018 at 08:02:16PM -0700, Jia He wrote: >Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns >where possible") optimized the loop in memmap_init_zone(). But there is >still some room for improvement. E.g. if pfn and pfn+1 are in the same >memblock region, we can

Re: [PATCH v3 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-27 Thread Jia He
On 3/28/2018 1:17 AM, Daniel Vacek Wrote: On Mon, Mar 26, 2018 at 5:02 AM, Jia He wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But there is still some room for improvement. E.g. if pfn and pfn+1 are i

Re: [PATCH v3 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-27 Thread Daniel Vacek
On Mon, Mar 26, 2018 at 5:02 AM, Jia He wrote: > Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns > where possible") optimized the loop in memmap_init_zone(). But there is > still some room for improvement. E.g. if pfn and pfn+1 are in the same > memblock region, we can simp

[PATCH v3 2/5] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-25 Thread Jia He
Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But there is still some room for improvement. E.g. if pfn and pfn+1 are in the same memblock region, we can simply pfn++ instead of doing the binary search in memblock_