Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-08 Thread Michel Lespinasse
On Fri, Feb 8, 2013 at 12:25 PM, Andrea Arcangeli wrote: > Hi Michel, > > On Sun, Feb 03, 2013 at 11:17:12PM -0800, Michel Lespinasse wrote: >> munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE >> at a time. When munlocking THP pages (or the huge zero page), this resulted

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-08 Thread Andrea Arcangeli
Hi Michel, On Sun, Feb 03, 2013 at 11:17:12PM -0800, Michel Lespinasse wrote: > munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE > at a time. When munlocking THP pages (or the huge zero page), this resulted > in taking the mm->page_table_lock 512 times in a row. > > We

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-08 Thread Andrea Arcangeli
Hi Michel, On Sun, Feb 03, 2013 at 11:17:12PM -0800, Michel Lespinasse wrote: munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE at a time. When munlocking THP pages (or the huge zero page), this resulted in taking the mm-page_table_lock 512 times in a row. We can do

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-08 Thread Michel Lespinasse
On Fri, Feb 8, 2013 at 12:25 PM, Andrea Arcangeli aarca...@redhat.com wrote: Hi Michel, On Sun, Feb 03, 2013 at 11:17:12PM -0800, Michel Lespinasse wrote: munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE at a time. When munlocking THP pages (or the huge zero page),

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-07 Thread Hillf Danton
On Thu, Feb 7, 2013 at 7:44 AM, Sasha Levin wrote: > On 02/04/2013 02:17 AM, Michel Lespinasse wrote: >> munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE >> at a time. When munlocking THP pages (or the huge zero page), this resulted >> in taking the mm->page_table_lock 512

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-07 Thread Hillf Danton
On Thu, Feb 7, 2013 at 7:44 AM, Sasha Levin sasha.le...@oracle.com wrote: On 02/04/2013 02:17 AM, Michel Lespinasse wrote: munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE at a time. When munlocking THP pages (or the huge zero page), this resulted in taking the

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-06 Thread Sasha Levin
On 02/06/2013 09:50 PM, Li Zhong wrote: > On Wed, 2013-02-06 at 18:44 -0500, Sasha Levin wrote: >> On 02/04/2013 02:17 AM, Michel Lespinasse wrote: >>> munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE >>> at a time. When munlocking THP pages (or the huge zero page), this

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-06 Thread Li Zhong
On Wed, 2013-02-06 at 18:44 -0500, Sasha Levin wrote: > On 02/04/2013 02:17 AM, Michel Lespinasse wrote: > > munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE > > at a time. When munlocking THP pages (or the huge zero page), this resulted > > in taking the

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-06 Thread Sasha Levin
On 02/04/2013 02:17 AM, Michel Lespinasse wrote: > munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE > at a time. When munlocking THP pages (or the huge zero page), this resulted > in taking the mm->page_table_lock 512 times in a row. > > We can do better by making use of

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-06 Thread Sasha Levin
On 02/04/2013 02:17 AM, Michel Lespinasse wrote: munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE at a time. When munlocking THP pages (or the huge zero page), this resulted in taking the mm-page_table_lock 512 times in a row. We can do better by making use of the

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-06 Thread Li Zhong
On Wed, 2013-02-06 at 18:44 -0500, Sasha Levin wrote: On 02/04/2013 02:17 AM, Michel Lespinasse wrote: munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE at a time. When munlocking THP pages (or the huge zero page), this resulted in taking the mm-page_table_lock 512

Re: [PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-06 Thread Sasha Levin
On 02/06/2013 09:50 PM, Li Zhong wrote: On Wed, 2013-02-06 at 18:44 -0500, Sasha Levin wrote: On 02/04/2013 02:17 AM, Michel Lespinasse wrote: munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE at a time. When munlocking THP pages (or the huge zero page), this resulted

[PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-03 Thread Michel Lespinasse
munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE at a time. When munlocking THP pages (or the huge zero page), this resulted in taking the mm->page_table_lock 512 times in a row. We can do better by making use of the page_mask returned by follow_page_mask (for the huge

[PATCH v2 3/3] mm: accelerate munlock() treatment of THP pages

2013-02-03 Thread Michel Lespinasse
munlock_vma_pages_range() was always incrementing addresses by PAGE_SIZE at a time. When munlocking THP pages (or the huge zero page), this resulted in taking the mm-page_table_lock 512 times in a row. We can do better by making use of the page_mask returned by follow_page_mask (for the huge zero