[PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl v2

2017-08-09 Thread jglisse
From: Jérôme Glisse MMU notifiers can sleep, but in try_to_unmap_one() we call mmu_notifier_invalidate_page() under page table lock. Let's instead use mmu_notifier_invalidate_range() outside page_vma_mapped_walk() loop. Changed since v1: - s/end/address + (1UL <<

[PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl v2

2017-08-09 Thread jglisse
From: Jérôme Glisse MMU notifiers can sleep, but in try_to_unmap_one() we call mmu_notifier_invalidate_page() under page table lock. Let's instead use mmu_notifier_invalidate_range() outside page_vma_mapped_walk() loop. Changed since v1: - s/end/address + (1UL << compound_order(page)) -

Re: [PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread Jerome Glisse
On Wed, Aug 09, 2017 at 01:17:42PM -0700, Andrew Morton wrote: > On Wed, 9 Aug 2017 12:52:46 -0400 (EDT) Jerome Glisse > wrote: > > > > On Wed, Aug 09, 2017 at 12:17:09PM -0400, jgli...@redhat.com wrote: > > > > From: J__r__me Glisse > > > > > > > > MMU

Re: [PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread Jerome Glisse
On Wed, Aug 09, 2017 at 01:17:42PM -0700, Andrew Morton wrote: > On Wed, 9 Aug 2017 12:52:46 -0400 (EDT) Jerome Glisse > wrote: > > > > On Wed, Aug 09, 2017 at 12:17:09PM -0400, jgli...@redhat.com wrote: > > > > From: J__r__me Glisse > > > > > > > > MMU notifiers can sleep, but in

Re: [PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread Andrew Morton
On Wed, 9 Aug 2017 12:52:46 -0400 (EDT) Jerome Glisse wrote: > > On Wed, Aug 09, 2017 at 12:17:09PM -0400, jgli...@redhat.com wrote: > > > From: J__r__me Glisse > > > > > > MMU notifiers can sleep, but in try_to_unmap_one() we call > > >

Re: [PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread Andrew Morton
On Wed, 9 Aug 2017 12:52:46 -0400 (EDT) Jerome Glisse wrote: > > On Wed, Aug 09, 2017 at 12:17:09PM -0400, jgli...@redhat.com wrote: > > > From: J__r__me Glisse > > > > > > MMU notifiers can sleep, but in try_to_unmap_one() we call > > > mmu_notifier_invalidate_page() under page table lock. >

Re: [PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread Jerome Glisse
> On Wed, Aug 09, 2017 at 12:17:09PM -0400, jgli...@redhat.com wrote: > > From: Jérôme Glisse > > > > MMU notifiers can sleep, but in try_to_unmap_one() we call > > mmu_notifier_invalidate_page() under page table lock. > > > > Let's instead use

Re: [PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread Jerome Glisse
> On Wed, Aug 09, 2017 at 12:17:09PM -0400, jgli...@redhat.com wrote: > > From: Jérôme Glisse > > > > MMU notifiers can sleep, but in try_to_unmap_one() we call > > mmu_notifier_invalidate_page() under page table lock. > > > > Let's instead use mmu_notifier_invalidate_range() outside > >

Re: [PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread Kirill A. Shutemov
On Wed, Aug 09, 2017 at 12:17:09PM -0400, jgli...@redhat.com wrote: > From: Jérôme Glisse > > MMU notifiers can sleep, but in try_to_unmap_one() we call > mmu_notifier_invalidate_page() under page table lock. > > Let's instead use mmu_notifier_invalidate_range() outside >

Re: [PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread Kirill A. Shutemov
On Wed, Aug 09, 2017 at 12:17:09PM -0400, jgli...@redhat.com wrote: > From: Jérôme Glisse > > MMU notifiers can sleep, but in try_to_unmap_one() we call > mmu_notifier_invalidate_page() under page table lock. > > Let's instead use mmu_notifier_invalidate_range() outside > page_vma_mapped_walk()

[PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread jglisse
From: Jérôme Glisse MMU notifiers can sleep, but in try_to_unmap_one() we call mmu_notifier_invalidate_page() under page table lock. Let's instead use mmu_notifier_invalidate_range() outside page_vma_mapped_walk() loop. Signed-off-by: Jérôme Glisse Cc:

[PATCH] mm/rmap: try_to_unmap_one() do not call mmu_notifier under ptl

2017-08-09 Thread jglisse
From: Jérôme Glisse MMU notifiers can sleep, but in try_to_unmap_one() we call mmu_notifier_invalidate_page() under page table lock. Let's instead use mmu_notifier_invalidate_range() outside page_vma_mapped_walk() loop. Signed-off-by: Jérôme Glisse Cc: Kirill A. Shutemov Cc: Andrew Morton