Re: srcu: use cpu_online() instead custom check

2018-11-08 Thread Paul E. McKenney
On Thu, Nov 08, 2018 at 07:16:30PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-11-08 10:05:17 [-0800], Paul E. McKenney wrote: > > Just to make sure I understand, this is the call to queue_delayed_work_on() > > from srcu_queue_delayed_work_on(), right? > > correct. > > > And if I am guessin

Re: srcu: use cpu_online() instead custom check

2018-11-08 Thread Sebastian Andrzej Siewior
On 2018-11-08 10:05:17 [-0800], Paul E. McKenney wrote: > Just to make sure I understand, this is the call to queue_delayed_work_on() > from srcu_queue_delayed_work_on(), right? correct. > And if I am guessing correctly, you would like to get rid of the > constraint requiring CPUHP_RCUTREE_PREP t

Re: srcu: use cpu_online() instead custom check

2018-11-08 Thread Paul E. McKenney
On Thu, Nov 08, 2018 at 06:46:55PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-11-08 09:10:24 [-0800], Paul E. McKenney wrote: > > > Is this again a hidden RCU detail that preempt_disable() on CPU4 is > > > enough to ensure that CPU2 does not get marked offline between? > > > > The call_rcu_

Re: srcu: use cpu_online() instead custom check

2018-11-08 Thread Sebastian Andrzej Siewior
On 2018-11-08 09:10:24 [-0800], Paul E. McKenney wrote: > > Is this again a hidden RCU detail that preempt_disable() on CPU4 is > > enough to ensure that CPU2 does not get marked offline between? > > The call_rcu_sched parameter to synchronize_rcu_mult() makes this work. > This synchronize_rcu_mul

Re: srcu: use cpu_online() instead custom check

2018-11-08 Thread Paul E. McKenney
On Thu, Nov 08, 2018 at 05:38:51PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-11-01 16:12:28 [-0700], Paul E. McKenney wrote: > > > The current check via srcu_online is slightly racy because after looking > > > at srcu_online there could be an interrupt that interrupted us long > > > enough

Re: srcu: use cpu_online() instead custom check

2018-11-08 Thread Sebastian Andrzej Siewior
On 2018-11-01 16:12:28 [-0700], Paul E. McKenney wrote: > > The current check via srcu_online is slightly racy because after looking > > at srcu_online there could be an interrupt that interrupted us long > > enough until the CPU we checked against went offline. > > I don't see how this can happen

srcu: use cpu_online() instead custom check

2018-11-01 Thread Paul E. McKenney
> The current check via srcu_online is slightly racy because after looking > at srcu_online there could be an interrupt that interrupted us long > enough until the CPU we checked against went offline. I don't see how this can happen, even in -rt. The call to srcu_offline_cpu() happens very early

Re: [PATCH 1/3] srcu: use cpu_online() instead custom check

2017-09-28 Thread Paul E. McKenney
On Thu, Sep 28, 2017 at 06:02:08PM +0200, Sebastian Andrzej Siewior wrote: > On 2017-09-22 11:43:14 [-0700], Paul E. McKenney wrote: > > On Fri, Sep 22, 2017 at 05:28:04PM +0200, Sebastian Andrzej Siewior wrote: > > > The current check via srcu_online is slightly racy because after looking > > > at

Re: [PATCH 1/3] srcu: use cpu_online() instead custom check

2017-09-28 Thread Sebastian Andrzej Siewior
On 2017-09-22 11:43:14 [-0700], Paul E. McKenney wrote: > On Fri, Sep 22, 2017 at 05:28:04PM +0200, Sebastian Andrzej Siewior wrote: > > The current check via srcu_online is slightly racy because after looking > > at srcu_online there could be an interrupt that interrupted us long > > enough until

Re: [PATCH 1/3] srcu: use cpu_online() instead custom check

2017-09-22 Thread Paul E. McKenney
On Fri, Sep 22, 2017 at 05:28:04PM +0200, Sebastian Andrzej Siewior wrote: > The current check via srcu_online is slightly racy because after looking > at srcu_online there could be an interrupt that interrupted us long > enough until the CPU we checked against went offline. But in that case, woul

[PATCH 1/3] srcu: use cpu_online() instead custom check

2017-09-22 Thread Sebastian Andrzej Siewior
The current check via srcu_online is slightly racy because after looking at srcu_online there could be an interrupt that interrupted us long enough until the CPU we checked against went offline. An alternative would be to hold the hotplug rwsem (so the CPUs don't change their state) and then check