Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-15 Thread Joel Fernandes
On Fri, Mar 15, 2019 at 04:44:52PM +0900, Byungchul Park wrote: > On 03/15/2019 04:31 PM, Byungchul Park wrote: > > On Mon, Mar 11, 2019 at 09:39:39AM -0400, Joel Fernandes wrote: > > > On Wed, Aug 29, 2018 at 03:20:34PM -0700, Paul E. McKenney wrote: > > > > RCU's dyntick-idle code is written to

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-15 Thread Byungchul Park
On Mon, Mar 11, 2019 at 09:39:39AM -0400, Joel Fernandes wrote: > On Wed, Aug 29, 2018 at 03:20:34PM -0700, Paul E. McKenney wrote: > > RCU's dyntick-idle code is written to tolerate half-interrupts, that it, > > either an interrupt that invokes rcu_irq_enter() but never invokes the > >

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-15 Thread Byungchul Park
On 03/15/2019 04:31 PM, Byungchul Park wrote: On Mon, Mar 11, 2019 at 09:39:39AM -0400, Joel Fernandes wrote: On Wed, Aug 29, 2018 at 03:20:34PM -0700, Paul E. McKenney wrote: RCU's dyntick-idle code is written to tolerate half-interrupts, that it, either an interrupt that invokes

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-14 Thread Joel Fernandes
On Thu, Mar 14, 2019 at 09:37:46AM -0400, Steven Rostedt wrote: > On Thu, 14 Mar 2019 09:36:57 -0400 > Steven Rostedt wrote: > > > On Thu, 14 Mar 2019 08:31:59 -0400 > > Joel Fernandes wrote: > > > > > Oh thanks for pointing that out. Yes it does work for me. I agree with the > > > lockdep API

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-14 Thread Steven Rostedt
On Thu, 14 Mar 2019 09:36:57 -0400 Steven Rostedt wrote: > On Thu, 14 Mar 2019 08:31:59 -0400 > Joel Fernandes wrote: > > > Oh thanks for pointing that out. Yes it does work for me. I agree with the > > lockdep API addition and others could benefit from it too. I will > > incorporate > > the

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-14 Thread Steven Rostedt
On Thu, 14 Mar 2019 08:31:59 -0400 Joel Fernandes wrote: > Oh thanks for pointing that out. Yes it does work for me. I agree with the > lockdep API addition and others could benefit from it too. I will incorporate > the lockdep API addition into the RCU patch, but let me know if I should >

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-14 Thread Joel Fernandes
On Wed, Mar 13, 2019 at 11:07:30AM -0700, Paul E. McKenney wrote: > On Wed, Mar 13, 2019 at 12:51:25PM -0400, Steven Rostedt wrote: > > On Wed, 13 Mar 2019 08:51:55 -0700 > > "Paul E. McKenney" wrote: > > > > > Does this mean that there is a better approach that Joel's suggestion? > > > I

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-13 Thread Paul E. McKenney
On Wed, Mar 13, 2019 at 12:51:25PM -0400, Steven Rostedt wrote: > On Wed, 13 Mar 2019 08:51:55 -0700 > "Paul E. McKenney" wrote: > > > Does this mean that there is a better approach that Joel's suggestion? > > I believe he would end up with something like this: > > > >

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-13 Thread Steven Rostedt
On Wed, 13 Mar 2019 08:51:55 -0700 "Paul E. McKenney" wrote: > Does this mean that there is a better approach that Joel's suggestion? > I believe he would end up with something like this: > > WARN_ON_ONCE(IS_ENABLED(CONFIG_PROVE_RCU) && !in_irq()); > > It would be nice if there is

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-13 Thread Paul E. McKenney
On Wed, Mar 13, 2019 at 11:27:26AM -0400, Steven Rostedt wrote: > On Wed, 13 Mar 2019 11:09:48 -0400 > Joel Fernandes wrote: > > > AFAICS, lockdep does not specifically track when we enter an interrupt, but > > rather only tracks when interrupts are enabled/disabled. > > It does: > > #define

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-13 Thread Steven Rostedt
On Wed, 13 Mar 2019 11:09:48 -0400 Joel Fernandes wrote: > AFAICS, lockdep does not specifically track when we enter an interrupt, but > rather only tracks when interrupts are enabled/disabled. It does: #define __irq_enter() \ do {

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-13 Thread Joel Fernandes
On Tue, Mar 12, 2019 at 08:20:34AM -0700, Paul E. McKenney wrote: [snip] > > >Could we be more explicit in the code that this function can only > > be called from an interrupt, and also we change the code comment to be more > > clear about it (like the following diff)? > > That would

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-12 Thread Paul E. McKenney
On Tue, Mar 12, 2019 at 11:05:14AM -0400, Joel Fernandes wrote: > On Mon, Mar 11, 2019 at 03:29:03PM -0700, Paul E. McKenney wrote: > > On Mon, Mar 11, 2019 at 09:39:39AM -0400, Joel Fernandes wrote: > > > On Wed, Aug 29, 2018 at 03:20:34PM -0700, Paul E. McKenney wrote: > > > > RCU's dyntick-idle

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-12 Thread Joel Fernandes
On Mon, Mar 11, 2019 at 03:29:03PM -0700, Paul E. McKenney wrote: > On Mon, Mar 11, 2019 at 09:39:39AM -0400, Joel Fernandes wrote: > > On Wed, Aug 29, 2018 at 03:20:34PM -0700, Paul E. McKenney wrote: > > > RCU's dyntick-idle code is written to tolerate half-interrupts, that it, > > > either an

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-11 Thread Paul E. McKenney
On Mon, Mar 11, 2019 at 09:39:39AM -0400, Joel Fernandes wrote: > On Wed, Aug 29, 2018 at 03:20:34PM -0700, Paul E. McKenney wrote: > > RCU's dyntick-idle code is written to tolerate half-interrupts, that it, > > either an interrupt that invokes rcu_irq_enter() but never invokes the > >

Re: [PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2019-03-11 Thread Joel Fernandes
On Wed, Aug 29, 2018 at 03:20:34PM -0700, Paul E. McKenney wrote: > RCU's dyntick-idle code is written to tolerate half-interrupts, that it, > either an interrupt that invokes rcu_irq_enter() but never invokes the > corresponding rcu_irq_exit() on the one hand, or an interrupt that never > invokes

[PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2018-08-29 Thread Paul E. McKenney
RCU's dyntick-idle code is written to tolerate half-interrupts, that it, either an interrupt that invokes rcu_irq_enter() but never invokes the corresponding rcu_irq_exit() on the one hand, or an interrupt that never invokes rcu_irq_enter() but does invoke the "corresponding" rcu_irq_exit() on the

[PATCH tip/core/rcu 06/19] rcu: Add warning to detect half-interrupts

2018-08-29 Thread Paul E. McKenney
RCU's dyntick-idle code is written to tolerate half-interrupts, that it, either an interrupt that invokes rcu_irq_enter() but never invokes the corresponding rcu_irq_exit() on the one hand, or an interrupt that never invokes rcu_irq_enter() but does invoke the "corresponding" rcu_irq_exit() on the