Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-14 Thread Peter Zijlstra
On Mon, 2007-05-14 at 14:07 +0200, Nick Piggin wrote: > On Fri, May 11, 2007 at 07:18:33PM +0200, Peter Zijlstra wrote: > > On Fri, 2007-05-11 at 18:52 +0200, Eric Dumazet wrote: > > > > > > But I personally find this new rw_mutex not scalable at all if you have > > > some > > > writers around.

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-14 Thread Peter Zijlstra
On Mon, 2007-05-14 at 13:58 +0200, Nick Piggin wrote: > On Fri, May 11, 2007 at 05:56:21PM +0200, Ingo Molnar wrote: > > > > * Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > > > I was toying with a scalable rw_mutex and found that it gives ~10% > > > reduction in system time on ebizzy runs (wit

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-14 Thread Nick Piggin
On Fri, May 11, 2007 at 07:18:33PM +0200, Peter Zijlstra wrote: > On Fri, 2007-05-11 at 18:52 +0200, Eric Dumazet wrote: > > > > But I personally find this new rw_mutex not scalable at all if you have > > some > > writers around. > > > > percpu_counter_sum is just a L1 cache eater, and O(NR_CPU

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-14 Thread Nick Piggin
On Fri, May 11, 2007 at 05:56:21PM +0200, Ingo Molnar wrote: > > * Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > I was toying with a scalable rw_mutex and found that it gives ~10% > > reduction in system time on ebizzy runs (without the MADV_FREE patch). > > > > 2-way x86_64 pentium D box: >

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-14 Thread Esben Nielsen
On Sat, 12 May 2007, Eric Dumazet wrote: Esben Nielsen a écrit : On Sat, 12 May 2007, Peter Zijlstra wrote: > On Sat, 2007-05-12 at 11:27 +0200, Esben Nielsen wrote: > > > > On Fri, 11 May 2007, Peter Zijlstra wrote: > > > > > > > > I was toying with a scalable rw_mutex and found th

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-12 Thread Ingo Molnar
* Esben Nielsen <[EMAIL PROTECTED]> wrote: > Yeah, after sending that mail I realized I accepted this fact way > back... But I disagree in that it is easy to avoid not write-lcling > the mm semaphore: A simple malloc() might lead to a mmap() call > creating trouble. Am I right? yeah - that's

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-12 Thread Esben Nielsen
On Sat, 12 May 2007, Ingo Molnar wrote: * Esben Nielsen <[EMAIL PROTECTED]> wrote: I notice that the rwsems used now isn't priority inversion safe (thus destroying the perpose of having PI futexes). We thus already have a bug in the mainline. you see everything in black and white, ignorin

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-12 Thread Eric Dumazet
Esben Nielsen a écrit : On Sat, 12 May 2007, Peter Zijlstra wrote: On Sat, 2007-05-12 at 11:27 +0200, Esben Nielsen wrote: On Fri, 11 May 2007, Peter Zijlstra wrote: I was toying with a scalable rw_mutex and found that it gives ~10% reduction in system time on ebizzy runs (without the

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-12 Thread Ingo Molnar
* Esben Nielsen <[EMAIL PROTECTED]> wrote: > I notice that the rwsems used now isn't priority inversion safe (thus > destroying the perpose of having PI futexes). We thus already have a > bug in the mainline. you see everything in black and white, ignoring all the grey scales! Upstream PI fut

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-12 Thread Esben Nielsen
On Sat, 12 May 2007, Peter Zijlstra wrote: On Sat, 2007-05-12 at 11:27 +0200, Esben Nielsen wrote: On Fri, 11 May 2007, Peter Zijlstra wrote: I was toying with a scalable rw_mutex and found that it gives ~10% reduction in system time on ebizzy runs (without the MADV_FREE patch). You br

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-12 Thread Peter Zijlstra
On Sat, 2007-05-12 at 11:27 +0200, Esben Nielsen wrote: > > On Fri, 11 May 2007, Peter Zijlstra wrote: > > > > > I was toying with a scalable rw_mutex and found that it gives ~10% > > reduction in > > system time on ebizzy runs (without the MADV_FREE patch). > > > > You break priority enheritan

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-12 Thread Esben Nielsen
On Fri, 11 May 2007, Peter Zijlstra wrote: I was toying with a scalable rw_mutex and found that it gives ~10% reduction in system time on ebizzy runs (without the MADV_FREE patch). You break priority enheritance on user space futexes! :-( The problems is that the futex waiter have to take

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-11 Thread Peter Zijlstra
On Fri, 2007-05-11 at 18:52 +0200, Eric Dumazet wrote: > Ingo Molnar a écrit : > > * Peter Zijlstra <[EMAIL PROTECTED]> wrote: > > > >> I was toying with a scalable rw_mutex and found that it gives ~10% > >> reduction in system time on ebizzy runs (without the MADV_FREE patch). > >> > >> 2-way x8

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-11 Thread Christoph Lameter
On Fri, 11 May 2007, Ingo Molnar wrote: > given how nice this looks already, have you considered completely > replacing rwsems with this? I suspect you could test the correctness of > that without doing a mass API changeover, by embedding struct rw_mutex > in struct rwsem and implementing kerne

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-11 Thread Eric Dumazet
Ingo Molnar a écrit : * Peter Zijlstra <[EMAIL PROTECTED]> wrote: I was toying with a scalable rw_mutex and found that it gives ~10% reduction in system time on ebizzy runs (without the MADV_FREE patch). 2-way x86_64 pentium D box: 2.6.21 /usr/bin/time ./ebizzy -m -P 59.49user 137.74system

Re: [PATCH 0/2] convert mmap_sem to a scalable rw_mutex

2007-05-11 Thread Ingo Molnar
* Peter Zijlstra <[EMAIL PROTECTED]> wrote: > I was toying with a scalable rw_mutex and found that it gives ~10% > reduction in system time on ebizzy runs (without the MADV_FREE patch). > > 2-way x86_64 pentium D box: > > 2.6.21 > > /usr/bin/time ./ebizzy -m -P > 59.49user 137.74system 1:49.2