Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Waiman Long
On 09/30/2013 03:47 PM, Tim Chen wrote: My qrwlock doesn't enable qrwlock by default. You have to use menuconfig to explicitly enable it. Have you done that when you build the test kernel? I am thinking of explicitly enabling it for x86 if the anon-vma lock is converted back to a rwlock. Yes, I

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Tim Chen
On Mon, 2013-09-30 at 12:47 -0700, Tim Chen wrote: > On Mon, 2013-09-30 at 15:35 -0400, Waiman Long wrote: > > On 09/30/2013 03:23 PM, Tim Chen wrote: > > > On Mon, 2013-09-30 at 20:14 +0200, Peter Zijlstra wrote: > > >> On Mon, Sep 30, 2013 at 10:10:27AM -0700, Tim Chen wrote: > > >>> Here's the e

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Tim Chen
On Mon, 2013-09-30 at 15:35 -0400, Waiman Long wrote: > On 09/30/2013 03:23 PM, Tim Chen wrote: > > On Mon, 2013-09-30 at 20:14 +0200, Peter Zijlstra wrote: > >> On Mon, Sep 30, 2013 at 10:10:27AM -0700, Tim Chen wrote: > >>> Here's the exim workload data: > >>> > >>> rwsem improvment: > >>> Waimai

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Waiman Long
On 09/30/2013 03:23 PM, Tim Chen wrote: On Mon, 2013-09-30 at 20:14 +0200, Peter Zijlstra wrote: On Mon, Sep 30, 2013 at 10:10:27AM -0700, Tim Chen wrote: Here's the exim workload data: rwsem improvment: Waimain's patch:+2.0% Alex+Tim's patchset:+4.8% Waiman+Alex+Tim:+5.3%

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Tim Chen
On Mon, 2013-09-30 at 20:14 +0200, Peter Zijlstra wrote: > On Mon, Sep 30, 2013 at 10:10:27AM -0700, Tim Chen wrote: > > Here's the exim workload data: > > > > rwsem improvment: > > Waimain's patch:+2.0% > > Alex+Tim's patchset:+4.8% > > Waiman+Alex+Tim:+5.3% > > > > convert r

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Peter Zijlstra
On Mon, Sep 30, 2013 at 10:10:27AM -0700, Tim Chen wrote: > Here's the exim workload data: > > rwsem improvment: > Waimain's patch:+2.0% > Alex+Tim's patchset:+4.8% > Waiman+Alex+Tim:+5.3% > > convert rwsem to rwlock_t for root anon_vma lock > Ingo's patch +11.7% >

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Linus Torvalds
On Mon, Sep 30, 2013 at 10:03 AM, Andrew Morton wrote: > > Let's convince ourselves that we won't be undoing things which will > return to bite us? Umm. We call them regressions, and we fix them. As already mentioned, the original switch to a mutex didn't even have any good explanation for it, m

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Andrew Morton
On Sat, 28 Sep 2013 21:52:07 +0200 Ingo Molnar wrote: > Here's a an almost totally untested patch to convert the anon vma lock to > an rwlock_t. Both the anon vma lock and i_mmap_lock used to be spinlocks. Peter turned them both into sleeping locks in this series: https://lkml.org/lkml/2011/4/

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Tim Chen
On Sat, 2013-09-28 at 21:52 +0200, Ingo Molnar wrote: > * Linus Torvalds wrote: > > > On Sat, Sep 28, 2013 at 12:37 PM, Ingo Molnar wrote: > > > > > > - down_write_nest_lock(&anon_vma->root->rwsem, > > > &mm->mmap_sem); > > > + down_write_nest_lock(&anon_vma->root->r

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Peter Zijlstra
On Sat, Sep 28, 2013 at 09:52:07PM +0200, Ingo Molnar wrote: > Index: tip/mm/mmap.c > === > --- tip.orig/mm/mmap.c > +++ tip/mm/mmap.c > @@ -2955,15 +2955,15 @@ static void vm_lock_anon_vma(struct mm_s >* The LSB of hea

Re: [PATCH, v2] anon_vmas: Convert the rwsem to an rwlock_t

2013-09-30 Thread Peter Zijlstra
On Sat, Sep 28, 2013 at 09:52:07PM +0200, Ingo Molnar wrote: > Index: tip/mm/rmap.c > === > --- tip.orig/mm/rmap.c > +++ tip/mm/rmap.c > @@ -98,12 +98,12 @@ static inline void anon_vma_free(struct >* page_lock_anon_vma_read()