Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1376935

[PATCH tip/core/rcu 01/16] rcu: Make expedited RCU-sched grace period immediately detect idle

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH tip/core/rcu 01/16] rcu: Make expedited RCU-sched grace period immediately detect idle
Date 2016-04-12 17:40 +0200
Message-ID <rn8A3-1cd-25@gated-at.bofh.it> (permalink)
References <rn8qm-16v-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Currently, sync_sched_exp_handler() will force a reschedule unless
this CPU has already checked in or unless a reschedule has already
been called for.  This is clearly wasteful if sync_sched_exp_handler()
interrupted an idle CPU, so this commit immediately reports the
quiescent state in that case.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcu/tree.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 531a328076bd..5f4336fadc28 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3649,6 +3649,11 @@ static void sync_sched_exp_handler(void *data)
 	if (!(READ_ONCE(rnp->expmask) & rdp->grpmask) ||
 	    __this_cpu_read(rcu_sched_data.cpu_no_qs.b.exp))
 		return;
+	if (rcu_is_cpu_rrupt_from_idle()) {
+		rcu_report_exp_rdp(&rcu_sched_state,
+				   this_cpu_ptr(&rcu_sched_data), true);
+		return;
+	}
 	__this_cpu_write(rcu_sched_data.cpu_no_qs.b.exp, true);
 	resched_cpu(smp_processor_id());
 }
-- 
2.5.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH tip/core/rcu 0/16] Expedited grace-period changes for 4.7 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:30 +0200
  [PATCH tip/core/rcu 07/16] rcu: Add expedited-grace-period event tracing "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:30 +0200
  [PATCH tip/core/rcu 02/16] rcu: Make expedited RCU-preempt stall warnings count accurately "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:30 +0200
  [PATCH tip/core/rcu 10/16] rcu: Shorten expedited_workdone* to exp_workdone* "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:30 +0200
  [PATCH tip/core/rcu 09/16] rcu: Force boolean subscript for expedited stall warnings "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:30 +0200
  [PATCH tip/core/rcu 08/16] rcu: Remove expedited GP funnel-lock bypass "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 05/16] rcu: Add event tracing definitions for expedited grace periods "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 03/16] rcu: Make cond_resched_rcu_qs() supply RCU-sched expedited QS "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 06/16] rcu: Add funnel-locking tracing for expedited grace periods "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 14/16] rcu: Consolidate expedited GP tracing into rcu_exp_gp_seq_snap() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 01/16] rcu: Make expedited RCU-sched grace period immediately detect idle "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 15/16] rcu: Consolidate expedited GP code into exp_funnel_lock() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 16/16] rcu: Overlap wakeups with next expedited grace period "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 12/16] rcu: Add exp_funnel_lock() fastpath "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 11/16] rcu: Enforce expedited-GP fairness via funnel wait queue "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 04/16] rcu: Fix synchronize_rcu_expedited() header comment "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200
  [PATCH tip/core/rcu 13/16] rcu: Consolidate expedited GP code into rcu_exp_wait_wake() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-12 17:40 +0200

csiph-web