Re: [PATCH 1/4] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-22 Thread Eugeniu Rosca
On Wed, Mar 21, 2018 at 08:28:18PM +0800, Jia He wrote: > > > On 3/21/2018 6:14 PM, Daniel Vacek Wrote: > >On Wed, Mar 21, 2018 at 9:09 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

Re: [PATCH 1/4] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-21 Thread Daniel Vacek
On Wed, Mar 21, 2018 at 1:28 PM, Jia He wrote: > > On 3/21/2018 6:14 PM, Daniel Vacek Wrote: >> >> On Wed, Mar 21, 2018 at 9:09 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 ther

Re: [PATCH 1/4] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-21 Thread Jia He
On 3/21/2018 6:14 PM, Daniel Vacek Wrote: On Wed, Mar 21, 2018 at 9:09 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 1/4] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-21 Thread Daniel Vacek
On Wed, Mar 21, 2018 at 9:09 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 1/4] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-03-21 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_