Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-10-13 Thread Sebastian Andrzej Siewior
On 2017-10-12 11:24:54 [-0700], Paul E. McKenney wrote: > So I keep mainline as is, and the local_irq_save()-to-local_lock_irqsave() > conversion happens in -rt, given that mainline doesn't have a > local_lock_irqsave(), correct? yes, that would be nice :) > And just so you know, there is one pat

Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-10-12 Thread Paul E. McKenney
On Thu, Oct 12, 2017 at 10:53:35AM +0200, Sebastian Andrzej Siewior wrote: > On 2017-10-10 14:43:13 [-0700], Paul E. McKenney wrote: > > diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c > > index 6d5880089ff6..558f9e7b283e 100644 > > --- a/kernel/rcu/srcutree.c > > +++ b/kernel/rcu/srcutr

Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-10-12 Thread Sebastian Andrzej Siewior
On 2017-10-10 14:43:13 [-0700], Paul E. McKenney wrote: > diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c > index 6d5880089ff6..558f9e7b283e 100644 > --- a/kernel/rcu/srcutree.c > +++ b/kernel/rcu/srcutree.c > @@ -830,7 +866,7 @@ void __call_srcu(struct srcu_struct *sp, struct rcu_head

Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-10-11 Thread Paul E. McKenney
On Wed, Oct 11, 2017 at 06:40:12PM +0200, Sebastian Andrzej Siewior wrote: > On 2017-10-10 14:43:13 [-0700], Paul E. McKenney wrote: > > > OK, internally I could get rid of raw_ at the expense of some code bloat, > > > but in the call_srcu() case, the caller might well hold a raw_ lock. > > > > Ex

Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-10-11 Thread Sebastian Andrzej Siewior
On 2017-10-10 14:43:13 [-0700], Paul E. McKenney wrote: > > OK, internally I could get rid of raw_ at the expense of some code bloat, > > but in the call_srcu() case, the caller might well hold a raw_ lock. > > Except that none currently do, so maybe downgrading from raw_ locks is > a reasonable c

Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-10-10 Thread Paul E. McKenney
On Thu, Sep 28, 2017 at 06:10:46PM -0700, Paul E. McKenney wrote: > On Thu, Sep 28, 2017 at 06:03:57PM +0200, Sebastian Andrzej Siewior wrote: > > On 2017-09-22 11:46:10 [-0700], Paul E. McKenney wrote: > > > On Fri, Sep 22, 2017 at 05:28:05PM +0200, Sebastian Andrzej Siewior wrote: > > > > On RT w

Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-09-28 Thread Paul E. McKenney
On Thu, Sep 28, 2017 at 06:03:57PM +0200, Sebastian Andrzej Siewior wrote: > On 2017-09-22 11:46:10 [-0700], Paul E. McKenney wrote: > > On Fri, Sep 22, 2017 at 05:28:05PM +0200, Sebastian Andrzej Siewior wrote: > > > On RT we can't invoke queue_delayed_work() within an atomic section > > > (which

Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-09-28 Thread Sebastian Andrzej Siewior
On 2017-09-22 11:46:10 [-0700], Paul E. McKenney wrote: > On Fri, Sep 22, 2017 at 05:28:05PM +0200, Sebastian Andrzej Siewior wrote: > > On RT we can't invoke queue_delayed_work() within an atomic section > > (which is provided by raw_spin_lock_irqsave()). > > srcu_reschedule() invokes queue_delaye

Re: [PATCH 2/3] srcu: queue work without holding the lock

2017-09-22 Thread Paul E. McKenney
On Fri, Sep 22, 2017 at 05:28:05PM +0200, Sebastian Andrzej Siewior wrote: > On RT we can't invoke queue_delayed_work() within an atomic section > (which is provided by raw_spin_lock_irqsave()). > srcu_reschedule() invokes queue_delayed_work() outside of the > raw_spin_lock_irq_rcu_node() section s

[PATCH 2/3] srcu: queue work without holding the lock

2017-09-22 Thread Sebastian Andrzej Siewior
On RT we can't invoke queue_delayed_work() within an atomic section (which is provided by raw_spin_lock_irqsave()). srcu_reschedule() invokes queue_delayed_work() outside of the raw_spin_lock_irq_rcu_node() section so this should be fine here, too. If the remaining callers of call_srcu() aren't ato