Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-10-15 Thread Paul E. McKenney
On Mon, Oct 15, 2018 at 11:33:48PM +0800, Boqun Feng wrote: > On Mon, Oct 15, 2018 at 05:09:03PM +0200, Sebastian Andrzej Siewior wrote: > > On 2018-10-15 23:07:15 [+0800], Boqun Feng wrote: > > > Hi, Sebastian > > Hi Boqun, > > > > > On Mon, Oct 15, 2018 at 04:42:17PM +0200, Sebastian Andrzej Sie

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-10-15 Thread Boqun Feng
On Mon, Oct 15, 2018 at 05:09:03PM +0200, Sebastian Andrzej Siewior wrote: > On 2018-10-15 23:07:15 [+0800], Boqun Feng wrote: > > Hi, Sebastian > Hi Boqun, > > > On Mon, Oct 15, 2018 at 04:42:17PM +0200, Sebastian Andrzej Siewior wrote: > > > On 2018-10-13 06:48:13 [-0700], Paul E. McKenney wrote

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-10-15 Thread Sebastian Andrzej Siewior
On 2018-10-15 23:07:15 [+0800], Boqun Feng wrote: > Hi, Sebastian Hi Boqun, > On Mon, Oct 15, 2018 at 04:42:17PM +0200, Sebastian Andrzej Siewior wrote: > > On 2018-10-13 06:48:13 [-0700], Paul E. McKenney wrote: > > > > > > My concern would be that it would queue it by default for the current >

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-10-15 Thread Boqun Feng
Hi, Sebastian On Mon, Oct 15, 2018 at 04:42:17PM +0200, Sebastian Andrzej Siewior wrote: > On 2018-10-13 06:48:13 [-0700], Paul E. McKenney wrote: > > > > My concern would be that it would queue it by default for the current > > CPU, which would serialize the processing, losing the concurrency of

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-10-15 Thread Sebastian Andrzej Siewior
On 2018-10-13 06:48:13 [-0700], Paul E. McKenney wrote: > > My concern would be that it would queue it by default for the current > CPU, which would serialize the processing, losing the concurrency of > grace-period initialization. But that was a long time ago, and perhaps > workqueues have chang

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-10-13 Thread Paul E. McKenney
On Fri, Oct 12, 2018 at 08:41:15PM +0200, Sebastian Andrzej Siewior wrote: > On 2018-09-19 15:11:40 [-0700], Paul E. McKenney wrote: > > On Wed, Sep 19, 2018 at 01:55:21PM -0700, Tejun Heo wrote: > > > Unbound workqueue is NUMA-affine by default, so using it by default > > > might not harm anything

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-10-12 Thread Sebastian Andrzej Siewior
On 2018-09-19 15:11:40 [-0700], Paul E. McKenney wrote: > On Wed, Sep 19, 2018 at 01:55:21PM -0700, Tejun Heo wrote: > > Unbound workqueue is NUMA-affine by default, so using it by default > > might not harm anything. > > OK, so the above workaround would function correctly on -rt, thank you! > >

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-09-19 Thread Paul E. McKenney
On Wed, Sep 19, 2018 at 01:55:21PM -0700, Tejun Heo wrote: > Hello, > > On Tue, Sep 11, 2018 at 10:02:22AM -0700, Paul E. McKenney wrote: > > > Doesn't work for me because it is still within the preempt-disable > > > section :/. > > > Would it work to use WORK_CPU_UNBOUND? As far as I understand i

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-09-19 Thread Tejun Heo
Hello, On Tue, Sep 11, 2018 at 10:02:22AM -0700, Paul E. McKenney wrote: > > Doesn't work for me because it is still within the preempt-disable > > section :/. > > Would it work to use WORK_CPU_UNBOUND? As far as I understand it, the > > CPU number does not matter, you just want to spread it acros

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-09-11 Thread Paul E. McKenney
On Tue, Sep 11, 2018 at 06:21:42PM +0200, Sebastian Andrzej Siewior wrote: > On 2018-09-11 09:05:32 [-0700], Paul E. McKenney wrote: > > On Mon, Sep 10, 2018 at 03:56:16PM +0200, Sebastian Andrzej Siewior wrote: > > > It was possible that sync_rcu_exp_select_cpus() enqueued something on > > > CPU0

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-09-11 Thread Sebastian Andrzej Siewior
On 2018-09-11 09:05:32 [-0700], Paul E. McKenney wrote: > On Mon, Sep 10, 2018 at 03:56:16PM +0200, Sebastian Andrzej Siewior wrote: > > It was possible that sync_rcu_exp_select_cpus() enqueued something on > > CPU0 while CPU0 was offline. Such a work item wouldn't be processed > > until CPU0 gets

Re: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-09-11 Thread Paul E. McKenney
On Mon, Sep 10, 2018 at 03:56:16PM +0200, Sebastian Andrzej Siewior wrote: > It was possible that sync_rcu_exp_select_cpus() enqueued something on > CPU0 while CPU0 was offline. Such a work item wouldn't be processed > until CPU0 gets back online. This problem was addressed in commit > fcc635436501

[PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask

2018-09-10 Thread Sebastian Andrzej Siewior
It was possible that sync_rcu_exp_select_cpus() enqueued something on CPU0 while CPU0 was offline. Such a work item wouldn't be processed until CPU0 gets back online. This problem was addressed in commit fcc6354365015 ("rcu: Make expedited GPs handle CPU 0 being offline"). I don't think the issue f