Re: [PATCH v6 16/24] mm: Protect mm_rb tree with a rwlock

2018-01-15 Thread Laurent Dufour
Hi Matthew, Thanks for reviewing this series. On 12/01/2018 19:48, Matthew Wilcox wrote: > On Fri, Jan 12, 2018 at 06:26:00PM +0100, Laurent Dufour wrote: >> -static void __vma_rb_erase(struct vm_area_struct *vma, struct rb_root *root) >> +static void __vma_rb_erase(struct vm_area_struct *vma,

Re: [PATCH v6 16/24] mm: Protect mm_rb tree with a rwlock

2018-01-15 Thread Laurent Dufour
Hi Matthew, Thanks for reviewing this series. On 12/01/2018 19:48, Matthew Wilcox wrote: > On Fri, Jan 12, 2018 at 06:26:00PM +0100, Laurent Dufour wrote: >> -static void __vma_rb_erase(struct vm_area_struct *vma, struct rb_root *root) >> +static void __vma_rb_erase(struct vm_area_struct *vma,

Re: [PATCH v6 16/24] mm: Protect mm_rb tree with a rwlock

2018-01-12 Thread Matthew Wilcox
On Fri, Jan 12, 2018 at 06:26:00PM +0100, Laurent Dufour wrote: > -static void __vma_rb_erase(struct vm_area_struct *vma, struct rb_root *root) > +static void __vma_rb_erase(struct vm_area_struct *vma, struct mm_struct *mm) > { > + struct rb_root *root = >mm_rb; > /* >* Note

Re: [PATCH v6 16/24] mm: Protect mm_rb tree with a rwlock

2018-01-12 Thread Matthew Wilcox
On Fri, Jan 12, 2018 at 06:26:00PM +0100, Laurent Dufour wrote: > -static void __vma_rb_erase(struct vm_area_struct *vma, struct rb_root *root) > +static void __vma_rb_erase(struct vm_area_struct *vma, struct mm_struct *mm) > { > + struct rb_root *root = >mm_rb; > /* >* Note

[PATCH v6 16/24] mm: Protect mm_rb tree with a rwlock

2018-01-12 Thread Laurent Dufour
This change is inspired by the Peter's proposal patch [1] which was protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in that particular case, and it is introducing major performance degradation due to excessive scheduling operations. To allow access to the mm_rb tree without

[PATCH v6 16/24] mm: Protect mm_rb tree with a rwlock

2018-01-12 Thread Laurent Dufour
This change is inspired by the Peter's proposal patch [1] which was protecting the VMA using SRCU. Unfortunately, SRCU is not scaling well in that particular case, and it is introducing major performance degradation due to excessive scheduling operations. To allow access to the mm_rb tree without