Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1553398 > unrolled thread

Re: [PATCH] mm: page_alloc: Skip over regions of invalid pfns where possible

Started byAndrew Morton <akpm@linux-foundation.org>
First post2017-01-06 23:50 +0100
Last post2017-01-11 00:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] mm: page_alloc: Skip over regions of invalid pfns where  possible Andrew Morton <akpm@linux-foundation.org> - 2017-01-06 23:50 +0100
    Re: [PATCH] mm: page_alloc: Skip over regions of invalid pfns where  possible James Hartley <james.hartley@imgtec.com> - 2017-01-11 00:40 +0100
      Re: [PATCH] mm: page_alloc: Skip over regions of invalid pfns where  possible Andrew Morton <akpm@linux-foundation.org> - 2017-01-11 00:50 +0100

#1553398 — Re: [PATCH] mm: page_alloc: Skip over regions of invalid pfns where possible

FromAndrew Morton <akpm@linux-foundation.org>
Date2017-01-06 23:50 +0100
SubjectRe: [PATCH] mm: page_alloc: Skip over regions of invalid pfns where possible
Message-ID<sWLuG-4T-35@gated-at.bofh.it>
On Fri, 25 Nov 2016 18:55:18 +0000 Paul Burton <paul.burton@imgtec.com> wrote:

> When using a sparse memory model memmap_init_zone() when invoked with
> the MEMMAP_EARLY context will skip over pages which aren't valid - ie.
> which aren't in a populated region of the sparse memory map. However if
> the memory map is extremely sparse then it can spend a long time
> linearly checking each PFN in a large non-populated region of the memory
> map & skipping it in turn.
> 
> When CONFIG_HAVE_MEMBLOCK_NODE_MAP is enabled, we have sufficient
> information to quickly discover the next valid PFN given an invalid one
> by searching through the list of memory regions & skipping forwards to
> the first PFN covered by the memory region to the right of the
> non-populated region. Implement this in order to speed up
> memmap_init_zone() for systems with extremely sparse memory maps.

Could we have a changelog which includes some timing measurements? 
That permits others to understand the value of this patch.

[toc] | [next] | [standalone]


#1556025

FromJames Hartley <james.hartley@imgtec.com>
Date2017-01-11 00:40 +0100
Message-ID<sYebg-7JK-31@gated-at.bofh.it>
In reply to#1553398
On 06/01/17 22:43, Andrew Morton wrote:
> On Fri, 25 Nov 2016 18:55:18 +0000 Paul Burton <paul.burton@imgtec.com> wrote:
>
>> When using a sparse memory model memmap_init_zone() when invoked with
>> the MEMMAP_EARLY context will skip over pages which aren't valid - ie.
>> which aren't in a populated region of the sparse memory map. However if
>> the memory map is extremely sparse then it can spend a long time
>> linearly checking each PFN in a large non-populated region of the memory
>> map & skipping it in turn.
>>
>> When CONFIG_HAVE_MEMBLOCK_NODE_MAP is enabled, we have sufficient
>> information to quickly discover the next valid PFN given an invalid one
>> by searching through the list of memory regions & skipping forwards to
>> the first PFN covered by the memory region to the right of the
>> non-populated region. Implement this in order to speed up
>> memmap_init_zone() for systems with extremely sparse memory maps.
> Could we have a changelog which includes some timing measurements? 
> That permits others to understand the value of this patch.
>
I have tested this patch on a virtual model of a Samurai CPU with a
sparse memory map.  The kernel boot time drops from 109 to 62 seconds. 

James

[toc] | [prev] | [next] | [standalone]


#1556055

FromAndrew Morton <akpm@linux-foundation.org>
Date2017-01-11 00:50 +0100
Message-ID<sYekW-7N0-17@gated-at.bofh.it>
In reply to#1556025
On Tue, 10 Jan 2017 23:37:53 +0000 James Hartley <james.hartley@imgtec.com> wrote:

> 
> On 06/01/17 22:43, Andrew Morton wrote:
> > On Fri, 25 Nov 2016 18:55:18 +0000 Paul Burton <paul.burton@imgtec.com> wrote:
> >
> >> When using a sparse memory model memmap_init_zone() when invoked with
> >> the MEMMAP_EARLY context will skip over pages which aren't valid - ie.
> >> which aren't in a populated region of the sparse memory map. However if
> >> the memory map is extremely sparse then it can spend a long time
> >> linearly checking each PFN in a large non-populated region of the memory
> >> map & skipping it in turn.
> >>
> >> When CONFIG_HAVE_MEMBLOCK_NODE_MAP is enabled, we have sufficient
> >> information to quickly discover the next valid PFN given an invalid one
> >> by searching through the list of memory regions & skipping forwards to
> >> the first PFN covered by the memory region to the right of the
> >> non-populated region. Implement this in order to speed up
> >> memmap_init_zone() for systems with extremely sparse memory maps.
> > Could we have a changelog which includes some timing measurements? 
> > That permits others to understand the value of this patch.
> >
> I have tested this patch on a virtual model of a Samurai CPU with a
> sparse memory map.  The kernel boot time drops from 109 to 62 seconds. 

Thanks.  Nice.  I updated the changelog.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web