Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-05 Thread Oleg Nesterov
On 03/05, Lai Jiangshan wrote: > > On 03/03/13 01:06, Oleg Nesterov wrote: > > On 03/02, Michel Lespinasse wrote: > >> > >> My version would be slower if it needs to take the > >> slow path in a reentrant way, but I'm not sure it matters either :) > > > > I'd say, this doesn't matter at all, simply

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-05 Thread Michel Lespinasse
On Tue, Mar 5, 2013 at 7:54 AM, Lai Jiangshan wrote: > On 03/03/13 01:06, Oleg Nesterov wrote: >> On 03/02, Michel Lespinasse wrote: >>> >>> My version would be slower if it needs to take the >>> slow path in a reentrant way, but I'm not sure it matters either :) >> >> I'd say, this doesn't matter

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-05 Thread Lai Jiangshan
On 03/03/13 01:06, Oleg Nesterov wrote: > On 03/02, Michel Lespinasse wrote: >> >> My version would be slower if it needs to take the >> slow path in a reentrant way, but I'm not sure it matters either :) > > I'd say, this doesn't matter at all, simply because this can only happen > if we race wit

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-02 Thread Oleg Nesterov
On 03/02, Michel Lespinasse wrote: > > My version would be slower if it needs to take the > slow path in a reentrant way, but I'm not sure it matters either :) I'd say, this doesn't matter at all, simply because this can only happen if we race with the active writer. Oleg. __

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-02 Thread Oleg Nesterov
On 03/02, Lai Jiangshan wrote: > > On 02/03/13 02:28, Oleg Nesterov wrote: > > Lai, I didn't read this discussion except the code posted by Michel. > > I'll try to read this patch carefully later, but I'd like to ask > > a couple of questions. > > > > This version looks more complex than Michel's,

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-02 Thread Lai Jiangshan
On 02/03/13 02:28, Oleg Nesterov wrote: > Lai, I didn't read this discussion except the code posted by Michel. > I'll try to read this patch carefully later, but I'd like to ask > a couple of questions. > > This version looks more complex than Michel's, why? Just curious, I > am trying to understa

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-02 Thread Michel Lespinasse
On Sat, Mar 2, 2013 at 2:28 AM, Oleg Nesterov wrote: > Lai, I didn't read this discussion except the code posted by Michel. > I'll try to read this patch carefully later, but I'd like to ask > a couple of questions. > > This version looks more complex than Michel's, why? Just curious, I > am tryin

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-01 Thread Srivatsa S. Bhat
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

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-01 Thread Oleg Nesterov
Lai, I didn't read this discussion except the code posted by Michel. I'll try to read this patch carefully later, but I'd like to ask a couple of questions. This version looks more complex than Michel's, why? Just curious, I am trying to understand what I missed. See http://marc.info/?l=linux-kern

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-01 Thread Tejun Heo
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_sp