[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51310A5F.1070001@linux.vnet.ibm.com>
Date: Sat, 02 Mar 2013 01:36:55 +0530
From: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To: Tejun Heo <tj@...nel.org>
CC: Lai Jiangshan <laijs@...fujitsu.com>,
Lai Jiangshan <eag0628@...il.com>,
Michel Lespinasse <walken@...gle.com>,
linux-doc@...r.kernel.org, peterz@...radead.org,
fweisbec@...il.com, linux-kernel@...r.kernel.org,
namhyung@...nel.org, mingo@...nel.org, linux-arch@...r.kernel.org,
linux@....linux.org.uk, xiaoguangrong@...ux.vnet.ibm.com,
wangyun@...ux.vnet.ibm.com, paulmck@...ux.vnet.ibm.com,
nikunj@...ux.vnet.ibm.com, linux-pm@...r.kernel.org,
rusty@...tcorp.com.au, rostedt@...dmis.org, rjw@...k.pl,
vincent.guittot@...aro.org, tglx@...utronix.de,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
oleg@...hat.com, sbw@....edu, akpm@...ux-foundation.org,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] lglock: add read-preference local-global rwlock
On 03/01/2013 11:23 PM, Tejun Heo wrote:
> Hey, guys and Oleg (yes, I'm singling you out ;p because you're that
> awesome.)
>
> On Sat, Mar 02, 2013 at 01:44:02AM +0800, Lai Jiangshan wrote:
>> Performance:
>> We only focus on the performance of the read site. this read site's fast path
>> is just preempt_disable() + __this_cpu_read/inc() + arch_spin_trylock(),
>> It has only one heavy memory operation. it will be expected fast.
>>
>> We test three locks.
>> 1) traditional rwlock WITHOUT remote competition nor cache-bouncing.(opt-rwlock)
>> 2) this lock(lgrwlock)
>> 3) V6 percpu-rwlock by "Srivatsa S. Bhat". (percpu-rwlock)
>> (https://lkml.org/lkml/2013/2/18/186)
>>
>> nested=1(no nested) nested=2 nested=4
>> opt-rwlock 517181 1009200 2010027
>> lgrwlock 452897 700026 1201415
>> percpu-rwlock 1192955 1451343 1951757
>
> On the first glance, the numbers look pretty good and I kinda really
> like the fact that if this works out we don't have to introduce yet
> another percpu synchronization construct and get to reuse lglock.
>
> So, Oleg, can you please see whether you can find holes in this one?
>
> Srivatsa, I know you spent a lot of time on percpu_rwlock but as you
> wrote before Lai's work can be seen as continuation of yours, and if
> we get to extend what's already there instead of introducing something
> completely new, there's no reason not to
Yep, I agree!
> (and my apologies for not
> noticing the possibility of extending lglock before).
No problem at all! You gave so many invaluable suggestions to make this
whole thing work in the first place! Now, if we can reuse the existing
stuff and extend it to what we want, then its just even better! :-)
> So, if this can
> work, it would be awesome if you guys can work together.
Absolutely!
> Lai might
> not be very good at communicating in english yet but he's really good
> at spotting patterns in complex code and playing with them.
>
That sounds great! :-)
I'll soon take a closer look at his code and the comparisons he posted,
and work towards taking this effort forward.
Thank you very much!
Regards,
Srivatsa S. Bhat
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists