Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-08-09 Thread Peter Zijlstra
On Mon, Jul 25, 2016 at 07:26:26PM +0200, Oleg Nesterov wrote: > On 07/25, John Stultz wrote: > > > > Can you also make clear which patches of PeterZ's I should be adding > > as well for testing? I've lost the plot as to what goes with what.. > > Well, my understanding is that Peter is going to s

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-25 Thread Paul E. McKenney
On Mon, Jul 25, 2016 at 07:01:17PM +0200, Oleg Nesterov wrote: > Paul, sorry for delay. > > On 07/21, Paul E. McKenney wrote: > > > > On Thu, Jul 21, 2016 at 07:34:36PM +0200, Oleg Nesterov wrote: > > > On 07/20, Paul E. McKenney wrote: > > > > > > > > On Wed, Jul 20, 2016 at 07:16:03PM +0200, Ole

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-25 Thread Oleg Nesterov
On 07/25, John Stultz wrote: > > Can you also make clear which patches of PeterZ's I should be adding > as well for testing? I've lost the plot as to what goes with what.. Well, my understanding is that Peter is going to send v2 with some minor changes, I am going to send this patch on top of his

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-25 Thread John Stultz
On Mon, Jul 25, 2016 at 10:01 AM, Oleg Nesterov wrote: > Paul, sorry for delay. > > On 07/21, Paul E. McKenney wrote: >> >> On Thu, Jul 21, 2016 at 07:34:36PM +0200, Oleg Nesterov wrote: >> > On 07/20, Paul E. McKenney wrote: >> > > >> > > On Wed, Jul 20, 2016 at 07:16:03PM +0200, Oleg Nesterov wr

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-25 Thread Oleg Nesterov
Paul, sorry for delay. On 07/21, Paul E. McKenney wrote: > > On Thu, Jul 21, 2016 at 07:34:36PM +0200, Oleg Nesterov wrote: > > On 07/20, Paul E. McKenney wrote: > > > > > > On Wed, Jul 20, 2016 at 07:16:03PM +0200, Oleg Nesterov wrote: > > > > > > > Now, suppose we add the additional enter/exit's

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-21 Thread Paul E. McKenney
On Thu, Jul 21, 2016 at 07:34:36PM +0200, Oleg Nesterov wrote: > On 07/20, Paul E. McKenney wrote: > > > > On Wed, Jul 20, 2016 at 07:16:03PM +0200, Oleg Nesterov wrote: > > > > > Now, suppose we add the additional enter/exit's: > > > > > > freeze_super(sb) > > > { > > > // this doesn

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-21 Thread Oleg Nesterov
On 07/20, Paul E. McKenney wrote: > > On Wed, Jul 20, 2016 at 07:16:03PM +0200, Oleg Nesterov wrote: > > > Now, suppose we add the additional enter/exit's: > > > > freeze_super(sb) > > { > > // this doesn't block > > __rcu_sync_enter(SEM3); > > __rcu_sync

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-21 Thread Oleg Nesterov
On 07/20, Paul E. McKenney wrote: > > On Wed, Jul 20, 2016 at 05:13:58PM +0200, Oleg Nesterov wrote: > > > rcu_sync_enter() or __rcu_sync_enter() is legal in any state, the latter > > won't block. > > Actually, I had no idea that __rcu_sync_enter() was intended for anything > other than internal us

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-20 Thread Paul E. McKenney
On Wed, Jul 20, 2016 at 07:16:03PM +0200, Oleg Nesterov wrote: > Paul, I had to switch to internal bugzillas after the first email, and now > I feel I can't read... I'll try to answer one question right now, tomorrow > I'll reread your email, probably I need to answer something else... I know that

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-20 Thread Paul E. McKenney
On Wed, Jul 20, 2016 at 05:13:58PM +0200, Oleg Nesterov wrote: > On 07/19, Paul E. McKenney wrote: > > > > On Sat, Jul 16, 2016 at 07:10:07PM +0200, Oleg Nesterov wrote: > > > > > And, there is another possible transition, GP_ENTER -> GP_IDLE, because > > > not it is possible to call __rcu_sync_ent

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-20 Thread Oleg Nesterov
Paul, I had to switch to internal bugzillas after the first email, and now I feel I can't read... I'll try to answer one question right now, tomorrow I'll reread your email, probably I need to answer something else... On 07/19, Paul E. McKenney wrote: > > On Sat, Jul 16, 2016 at 07:10:07PM +0200,

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-20 Thread Oleg Nesterov
On 07/19, Paul E. McKenney wrote: > > On Sat, Jul 16, 2016 at 07:10:07PM +0200, Oleg Nesterov wrote: > > > And, there is another possible transition, GP_ENTER -> GP_IDLE, because > > not it is possible to call __rcu_sync_enter() and rcu_sync_exit() in any > > state (except obviously they should be

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-19 Thread Paul E. McKenney
On Sat, Jul 16, 2016 at 07:10:07PM +0200, Oleg Nesterov wrote: > On 07/15, Paul E. McKenney wrote: > > > > On Fri, Jul 15, 2016 at 06:49:39PM +0200, Oleg Nesterov wrote: > > > > > > IOW, please ignore 2/2 which adds PERCPU_RWSEM_READER, the new version > > > just adds rcu_sync_sabotage() which shou

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-18 Thread Oleg Nesterov
On 07/18, Peter Zijlstra wrote: > > I think I ended up with this: > > .> GP_IDLE <--. > | || > | | __rcu_sync_enter() | / rcu_sync_exit() > | v| > |GP_ENTER --' > | | > || > |v >

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-18 Thread Peter Zijlstra
On Sat, Jul 16, 2016 at 07:10:07PM +0200, Oleg Nesterov wrote: > Peter, Paul, could you review? Do you see any hole? > > Why. Firstly, note that the state machine was greatly simplified, and > rsp->cb_state has gone, we have a single "state" variable, gp_state. > Note also the ->sync() op has gone

Re: [PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-16 Thread Oleg Nesterov
Damn, sorry for noise... On 07/16, Oleg Nesterov wrote: > > And, there is another possible transition, GP_ENTER -> GP_IDLE, because > not it is possible to call __rcu_sync_enter() and rcu_sync_exit() in any ^^^ I tried to say "now it is possible ..." Oleg.

[PATCH] rcu_sync: simplify the state machine, introduce __rcu_sync_enter()

2016-07-16 Thread Oleg Nesterov
On 07/15, Paul E. McKenney wrote: > > On Fri, Jul 15, 2016 at 06:49:39PM +0200, Oleg Nesterov wrote: > > > > IOW, please ignore 2/2 which adds PERCPU_RWSEM_READER, the new version > > just adds rcu_sync_sabotage() which should be renamed (and use GP_PASSED). > > OK, then move the checks out into th