Re: [PATCH v12 2/2] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn

2019-07-24 Thread Hanjun Guo
On 2019/7/23 16:33, Mike Rapoport wrote: > On Tue, Jul 23, 2019 at 01:51:13PM +0800, Hanjun Guo wrote: >> From: Jia He >> >> After skipping some invalid pfns in memmap_init_zone(), there is still >> some room for improvement. >> >> E.g. if pfn and pfn+1 are in the same memblock region, we can

Re: [PATCH v12 2/2] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn

2019-07-23 Thread Mike Rapoport
On Tue, Jul 23, 2019 at 01:51:13PM +0800, Hanjun Guo wrote: > From: Jia He > > After skipping some invalid pfns in memmap_init_zone(), 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

[PATCH v12 2/2] mm: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn

2019-07-22 Thread Hanjun Guo
From: Jia He After skipping some invalid pfns in memmap_init_zone(), 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_next_valid_pfn. Furthermore, if the pfn is in a gap of two