Re: [PATCH RFC] x86/entry: Ask RCU if it needs rcu_irq_{enter,exit}()

2020-06-12 Thread Paul E. McKenney
On Fri, Jun 12, 2020 at 11:27:21AM +0200, Thomas Gleixner wrote: > "Paul E. McKenney" writes: > > +static __always_inline bool rcu_needs_irq_enter(void) > > +{ > > + return !IS_ENABLED(CONFIG_TINY_RCU) && > > + (context_tracking_enabled_cpu(smp_processor_id()) || > >

Re: [PATCH RFC] x86/entry: Ask RCU if it needs rcu_irq_{enter,exit}()

2020-06-12 Thread Thomas Gleixner
Andy Lutomirski writes: > > This is saying we were idle and __rcu_is_watching() correctly returned > false. We got sysvec_apic_timer_interrupt(), which did > rcu_irq_enter() and then turned on IRQs for softirq processing. Then > we got sysvec_call_function_single() inside that, and >

Re: [PATCH RFC] x86/entry: Ask RCU if it needs rcu_irq_{enter,exit}()

2020-06-12 Thread Thomas Gleixner
"Paul E. McKenney" writes: > +static __always_inline bool rcu_needs_irq_enter(void) > +{ > + return !IS_ENABLED(CONFIG_TINY_RCU) && > + (context_tracking_enabled_cpu(smp_processor_id()) || > is_idle_task(current)); This reintroduces the #PF problem which started the whole

Re: [PATCH RFC] x86/entry: Ask RCU if it needs rcu_irq_{enter,exit}()

2020-06-11 Thread Andy Lutomirski
On Thu, Jun 11, 2020 at 4:53 PM Paul E. McKenney wrote: > > RCU needs to detect when one if its interrupt handlers interrupted an idle > state, where an idle state is either the idle loop itself or nohz_full > userspace execution. When a CPU has been interrupted from one of these > idle states,

Re: [PATCH RFC] x86/entry: Ask RCU if it needs rcu_irq_{enter,exit}()

2020-06-11 Thread Paul E. McKenney
On Thu, Jun 11, 2020 at 04:53:05PM -0700, Paul E. McKenney wrote: > RCU needs to detect when one if its interrupt handlers interrupted an idle > state, where an idle state is either the idle loop itself or nohz_full > userspace execution. When a CPU has been interrupted from one of these > idle

[PATCH RFC] x86/entry: Ask RCU if it needs rcu_irq_{enter,exit}()

2020-06-11 Thread Paul E. McKenney
RCU needs to detect when one if its interrupt handlers interrupted an idle state, where an idle state is either the idle loop itself or nohz_full userspace execution. When a CPU has been interrupted from one of these idle states, RCU can report a quiescent state, helping the current grace period