Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1240991
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers |
| Date | 2015-10-06 23:00 +0200 |
| Message-ID | <qgHv4-AR-17@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <qgE49-49R-21@gated-at.bofh.it> <qgE49-49R-19@gated-at.bofh.it> <qgExc-4Ib-27@gated-at.bofh.it> <qgGIG-84P-7@gated-at.bofh.it> <qgGSm-8hZ-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Oct 06, 2015 at 01:18:01PM -0700, Paul E. McKenney wrote:
> On Tue, Oct 06, 2015 at 10:05:38PM +0200, Peter Zijlstra wrote:
> > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > > index b9d9e0249e2f..93c0f23c3e45 100644
> > > --- a/kernel/rcu/tree.c
> > > +++ b/kernel/rcu/tree.c
> > > @@ -337,12 +337,14 @@ static void rcu_momentary_dyntick_idle(void)
> > > */
> > > void rcu_note_context_switch(void)
> > > {
> > > + barrier(); /* Avoid RCU read-side critical sections leaking down. */
> > > trace_rcu_utilization(TPS("Start context switch"));
> > > rcu_sched_qs();
> > > rcu_preempt_note_context_switch();
> > > if (unlikely(raw_cpu_read(rcu_sched_qs_mask)))
> > > rcu_momentary_dyntick_idle();
> > > trace_rcu_utilization(TPS("End context switch"));
> > > + barrier(); /* Avoid RCU read-side critical sections leaking up. */
> > > }
> > > EXPORT_SYMBOL_GPL(rcu_note_context_switch);
> >
> > These OTOH could be fixed with a noinline, such that the compiler may
> > never inline it, even with whole-program-optimizations, thereby
> > guaranteeing a function call boundary or compiler barrier.
>
> I like the barrier() with the comment. I expect it will be a bit more
> robust against toolchain changes.
Don't you in fact already rely on the fact that schedule() is a function
call and will not be inlined? (it doesn't have noinline and I suppose
whole program optimizers could go funny on it).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH tip/core/rcu 0/13] Miscellaneous fixes for 4.4 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
[PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
Re: [Kernel networking modules.] OSI levels 2 & 3, Assistance - If anyone knows anyone in the US. North West region "John D Allen, Leveridge Systems INC" <john.allen@leveridgesystems.com> - 2015-10-06 18:30 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers Josh Triplett <josh@joshtriplett.org> - 2015-10-06 18:50 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers Josh Triplett <josh@joshtriplett.org> - 2015-10-06 19:20 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers Josh Triplett <josh@joshtriplett.org> - 2015-10-06 19:50 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 19:50 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers Peter Zijlstra <peterz@infradead.org> - 2015-10-06 22:10 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 22:20 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers Peter Zijlstra <peterz@infradead.org> - 2015-10-06 23:00 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 23:10 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers Peter Zijlstra <peterz@infradead.org> - 2015-10-07 09:30 +0200
Re: [PATCH tip/core/rcu 04/13] rcu: Don't disable preemption for Tiny and Tree RCU readers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 19:20 +0200
[PATCH tip/core/rcu 03/13] rcu: Use call_rcu_func_t to replace explicit type equivalents "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
[PATCH tip/core/rcu 01/13] sched: Export sched_setscheduler_nocheck "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
[PATCH tip/core/rcu 09/13] rcu: Correct comment for values of ->gp_state field "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
[PATCH tip/core/rcu 11/13] rculist: Make list_entry_rcu() use lockless_dereference() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
[PATCH tip/core/rcu 02/13] rcu: Use rcu_callback_t in call_rcu*() and friends "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
[PATCH tip/core/rcu 12/13] rcu: Remove deprecated rcu_lockdep_assert() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
[PATCH tip/core/rcu 06/13] rcu: Add online/offline info to stall warning message "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:20 +0200
Re: [PATCH tip/core/rcu 06/13] rcu: Add online/offline info to stall warning message Josh Triplett <josh@joshtriplett.org> - 2015-10-06 19:20 +0200
[PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:30 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() Josh Triplett <josh@joshtriplett.org> - 2015-10-06 19:20 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 19:40 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() Josh Triplett <josh@joshtriplett.org> - 2015-10-06 19:50 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 20:10 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() Peter Zijlstra <peterz@infradead.org> - 2015-10-06 22:10 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 22:20 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() Peter Zijlstra <peterz@infradead.org> - 2015-10-06 22:40 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 23:10 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() Peter Zijlstra <peterz@infradead.org> - 2015-10-07 09:30 +0200
Re: [PATCH tip/core/rcu 07/13] rcu: Move preemption disabling out of __srcu_read_lock() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-07 16:20 +0200
[PATCH tip/core/rcu 05/13] rcu: Eliminate panic when silly boot-time fanout specified "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:30 +0200
[PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 18:30 +0200
Re: [PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() Josh Triplett <josh@joshtriplett.org> - 2015-10-06 19:30 +0200
Re: [PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 19:40 +0200
Re: [PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() Josh Triplett <josh@joshtriplett.org> - 2015-10-06 19:40 +0200
Re: [PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() Peter Zijlstra <peterz@infradead.org> - 2015-10-06 22:30 +0200
Re: [PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 23:10 +0200
Re: [PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() Peter Zijlstra <peterz@infradead.org> - 2015-10-07 09:30 +0200
Re: [PATCH tip/core/rcu 10/13] rcu: Add rcu_pointer_handoff() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-07 16:30 +0200
Re: [PATCH tip/core/rcu 0/13] Miscellaneous fixes for 4.4 Josh Triplett <josh@joshtriplett.org> - 2015-10-06 19:30 +0200
Re: [PATCH tip/core/rcu 0/13] Miscellaneous fixes for 4.4 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-06 19:40 +0200
csiph-web