Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-21 Thread Paul E. McKenney
On Wed, Aug 21, 2019 at 11:26:38AM -0400, Joel Fernandes wrote: > On Wed, Aug 21, 2019 at 10:56:17AM -0400, Joel Fernandes wrote: > > On Wed, Aug 21, 2019 at 10:38:41AM -0400, Joel Fernandes wrote: > > > On Mon, Aug 19, 2019 at 08:41:43AM -0700, Paul E. McKenney wrote: > > > > On Mon, Aug 19, 2019

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-21 Thread Joel Fernandes
On Wed, Aug 21, 2019 at 08:39:57AM -0700, Paul E. McKenney wrote: > On Wed, Aug 21, 2019 at 10:56:17AM -0400, Joel Fernandes wrote: [snip] > > I think one reason could be, in_irq() is false when the timer callback > > executes, since the timer callback is executing after a grace-period. The > >

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-21 Thread Paul E. McKenney
On Wed, Aug 21, 2019 at 10:56:17AM -0400, Joel Fernandes wrote: > On Wed, Aug 21, 2019 at 10:38:41AM -0400, Joel Fernandes wrote: > > On Mon, Aug 19, 2019 at 08:41:43AM -0700, Paul E. McKenney wrote: > > > On Mon, Aug 19, 2019 at 07:33:14AM -0700, Paul E. McKenney wrote: > > > > On Mon, Aug 19,

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-21 Thread Joel Fernandes
On Wed, Aug 21, 2019 at 10:56:17AM -0400, Joel Fernandes wrote: > On Wed, Aug 21, 2019 at 10:38:41AM -0400, Joel Fernandes wrote: > > On Mon, Aug 19, 2019 at 08:41:43AM -0700, Paul E. McKenney wrote: > > > On Mon, Aug 19, 2019 at 07:33:14AM -0700, Paul E. McKenney wrote: > > > > On Mon, Aug 19,

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-21 Thread Paul E. McKenney
On Wed, Aug 21, 2019 at 10:38:41AM -0400, Joel Fernandes wrote: > On Mon, Aug 19, 2019 at 08:41:43AM -0700, Paul E. McKenney wrote: > > On Mon, Aug 19, 2019 at 07:33:14AM -0700, Paul E. McKenney wrote: > > > On Mon, Aug 19, 2019 at 05:57:57AM -0700, Paul E. McKenney wrote: > > > > On Sun, Aug 18,

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-21 Thread Joel Fernandes
On Wed, Aug 21, 2019 at 10:38:41AM -0400, Joel Fernandes wrote: > On Mon, Aug 19, 2019 at 08:41:43AM -0700, Paul E. McKenney wrote: > > On Mon, Aug 19, 2019 at 07:33:14AM -0700, Paul E. McKenney wrote: > > > On Mon, Aug 19, 2019 at 05:57:57AM -0700, Paul E. McKenney wrote: > > > > On Sun, Aug 18,

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-21 Thread Joel Fernandes
On Mon, Aug 19, 2019 at 08:41:43AM -0700, Paul E. McKenney wrote: > On Mon, Aug 19, 2019 at 07:33:14AM -0700, Paul E. McKenney wrote: > > On Mon, Aug 19, 2019 at 05:57:57AM -0700, Paul E. McKenney wrote: > > > On Sun, Aug 18, 2019 at 07:29:27PM -0700, Paul E. McKenney wrote: > > > > On Sun, Aug

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-19 Thread Joel Fernandes
On Mon, Aug 19, 2019 at 07:14:38PM -0500, Scott Wood wrote: > On Sun, 2019-08-18 at 17:49 -0400, Joel Fernandes (Google) wrote: > > When we're in hard interrupt context in rcu_read_unlock_special(), we > > can still benefit from invoke_rcu_core() doing wake ups of rcuc > > threads when the

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-19 Thread Scott Wood
On Sun, 2019-08-18 at 17:49 -0400, Joel Fernandes (Google) wrote: > When we're in hard interrupt context in rcu_read_unlock_special(), we > can still benefit from invoke_rcu_core() doing wake ups of rcuc > threads when the !use_softirq parameter is passed. This is safe > to do so because: What

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-19 Thread Joel Fernandes
On Mon, Aug 19, 2019 at 08:41:43AM -0700, Paul E. McKenney wrote: > On Mon, Aug 19, 2019 at 07:33:14AM -0700, Paul E. McKenney wrote: > > On Mon, Aug 19, 2019 at 05:57:57AM -0700, Paul E. McKenney wrote: > > > On Sun, Aug 18, 2019 at 07:29:27PM -0700, Paul E. McKenney wrote: > > > > On Sun, Aug

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-19 Thread Paul E. McKenney
On Mon, Aug 19, 2019 at 07:33:14AM -0700, Paul E. McKenney wrote: > On Mon, Aug 19, 2019 at 05:57:57AM -0700, Paul E. McKenney wrote: > > On Sun, Aug 18, 2019 at 07:29:27PM -0700, Paul E. McKenney wrote: > > > On Sun, Aug 18, 2019 at 09:46:23PM -0400, Joel Fernandes wrote: > > > > On Sun, Aug 18,

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-19 Thread Paul E. McKenney
On Mon, Aug 19, 2019 at 05:57:57AM -0700, Paul E. McKenney wrote: > On Sun, Aug 18, 2019 at 07:29:27PM -0700, Paul E. McKenney wrote: > > On Sun, Aug 18, 2019 at 09:46:23PM -0400, Joel Fernandes wrote: > > > On Sun, Aug 18, 2019 at 09:41:43PM -0400, Joel Fernandes wrote: > > > > On Sun, Aug 18,

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-19 Thread Paul E. McKenney
On Sun, Aug 18, 2019 at 07:29:27PM -0700, Paul E. McKenney wrote: > On Sun, Aug 18, 2019 at 09:46:23PM -0400, Joel Fernandes wrote: > > On Sun, Aug 18, 2019 at 09:41:43PM -0400, Joel Fernandes wrote: > > > On Sun, Aug 18, 2019 at 06:21:53PM -0700, Paul E. McKenney wrote: > > [snip] > > > > > >

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Paul E. McKenney
On Sun, Aug 18, 2019 at 09:46:23PM -0400, Joel Fernandes wrote: > On Sun, Aug 18, 2019 at 09:41:43PM -0400, Joel Fernandes wrote: > > On Sun, Aug 18, 2019 at 06:21:53PM -0700, Paul E. McKenney wrote: > [snip] > > > > > Also, your commit log's point #2 is "in_irq() implies in_interrupt() > > > > >

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Joel Fernandes
On Sun, Aug 18, 2019 at 09:41:43PM -0400, Joel Fernandes wrote: > On Sun, Aug 18, 2019 at 06:21:53PM -0700, Paul E. McKenney wrote: [snip] > > > > Also, your commit log's point #2 is "in_irq() implies in_interrupt() > > > > which implies raising softirq will not do any wake ups." This mention > >

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Joel Fernandes
On Sun, Aug 18, 2019 at 06:21:53PM -0700, Paul E. McKenney wrote: > On Sun, Aug 18, 2019 at 07:38:39PM -0400, Joel Fernandes wrote: > > On Sun, Aug 18, 2019 at 04:31:35PM -0700, Paul E. McKenney wrote: > > > On Sun, Aug 18, 2019 at 06:35:11PM -0400, Joel Fernandes wrote: > > > > On Sun, Aug 18,

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Paul E. McKenney
On Sun, Aug 18, 2019 at 07:38:39PM -0400, Joel Fernandes wrote: > On Sun, Aug 18, 2019 at 04:31:35PM -0700, Paul E. McKenney wrote: > > On Sun, Aug 18, 2019 at 06:35:11PM -0400, Joel Fernandes wrote: > > > On Sun, Aug 18, 2019 at 06:32:30PM -0400, Joel Fernandes wrote: > > > > On Sun, Aug 18, 2019

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Joel Fernandes
On Sun, Aug 18, 2019 at 04:31:35PM -0700, Paul E. McKenney wrote: > On Sun, Aug 18, 2019 at 06:35:11PM -0400, Joel Fernandes wrote: > > On Sun, Aug 18, 2019 at 06:32:30PM -0400, Joel Fernandes wrote: > > > On Sun, Aug 18, 2019 at 03:12:10PM -0700, Paul E. McKenney wrote: > > > > On Sun, Aug 18,

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Paul E. McKenney
On Sun, Aug 18, 2019 at 06:35:11PM -0400, Joel Fernandes wrote: > On Sun, Aug 18, 2019 at 06:32:30PM -0400, Joel Fernandes wrote: > > On Sun, Aug 18, 2019 at 03:12:10PM -0700, Paul E. McKenney wrote: > > > On Sun, Aug 18, 2019 at 05:49:48PM -0400, Joel Fernandes (Google) wrote: > > > > When we're

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Joel Fernandes
On Sun, Aug 18, 2019 at 06:32:30PM -0400, Joel Fernandes wrote: > On Sun, Aug 18, 2019 at 03:12:10PM -0700, Paul E. McKenney wrote: > > On Sun, Aug 18, 2019 at 05:49:48PM -0400, Joel Fernandes (Google) wrote: > > > When we're in hard interrupt context in rcu_read_unlock_special(), we > > > can

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Joel Fernandes
On Sun, Aug 18, 2019 at 03:12:10PM -0700, Paul E. McKenney wrote: > On Sun, Aug 18, 2019 at 05:49:48PM -0400, Joel Fernandes (Google) wrote: > > When we're in hard interrupt context in rcu_read_unlock_special(), we > > can still benefit from invoke_rcu_core() doing wake ups of rcuc > > threads

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-18 Thread Paul E. McKenney
On Sun, Aug 18, 2019 at 05:49:48PM -0400, Joel Fernandes (Google) wrote: > When we're in hard interrupt context in rcu_read_unlock_special(), we > can still benefit from invoke_rcu_core() doing wake ups of rcuc > threads when the !use_softirq parameter is passed. This is safe > to do so because: