Re: [PATCH v12 21/31] mm: Introduce find_vma_rcu()

2019-04-24 Thread Laurent Dufour
Le 22/04/2019 à 22:57, Jerome Glisse a écrit : On Tue, Apr 16, 2019 at 03:45:12PM +0200, Laurent Dufour wrote: This allows to search for a VMA structure without holding the mmap_sem. The search is repeated while the mm seqlock is changing and until we found a valid VMA. While under the RCU

Re: [PATCH v12 21/31] mm: Introduce find_vma_rcu()

2019-04-24 Thread Laurent Dufour
Le 23/04/2019 à 11:27, Peter Zijlstra a écrit : On Tue, Apr 16, 2019 at 03:45:12PM +0200, Laurent Dufour wrote: This allows to search for a VMA structure without holding the mmap_sem. The search is repeated while the mm seqlock is changing and until we found a valid VMA. While under the RCU

Re: [PATCH v12 21/31] mm: Introduce find_vma_rcu()

2019-04-23 Thread Davidlohr Bueso
On Tue, 23 Apr 2019, Peter Zijlstra wrote: Also; the initial motivation was prefaulting large VMAs and the contention on mmap was killing things; but similarly, the contention on the refcount (I did try that) killed things just the same. Right, this is just like what can happen with per-vma

Re: [PATCH v12 21/31] mm: Introduce find_vma_rcu()

2019-04-23 Thread Peter Zijlstra
On Tue, Apr 16, 2019 at 03:45:12PM +0200, Laurent Dufour wrote: > This allows to search for a VMA structure without holding the mmap_sem. > > The search is repeated while the mm seqlock is changing and until we found > a valid VMA. > > While under the RCU protection, a reference is taken on the

Re: [PATCH v12 21/31] mm: Introduce find_vma_rcu()

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:12PM +0200, Laurent Dufour wrote: > This allows to search for a VMA structure without holding the mmap_sem. > > The search is repeated while the mm seqlock is changing and until we found > a valid VMA. > > While under the RCU protection, a reference is taken on the

[PATCH v12 21/31] mm: Introduce find_vma_rcu()

2019-04-16 Thread Laurent Dufour
This allows to search for a VMA structure without holding the mmap_sem. The search is repeated while the mm seqlock is changing and until we found a valid VMA. While under the RCU protection, a reference is taken on the VMA, so the caller must call put_vma() once it not more need the VMA