aboutsummaryrefslogtreecommitdiff
path: root/include/linux/srcuclassic.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-04-27 07:41:37 +0200
committerIngo Molnar <mingo@kernel.org>2017-04-27 07:41:37 +0200
commit96fd20cf3f1620d699db43cd08745f1e57e1072a (patch)
tree88b0caa1cd8bfa66e6a4b00ad21108f03369eb03 /include/linux/srcuclassic.h
parentd160a727c40e7175aa642137910a3fda46262fc8 (diff)
parent22607d66bbc3e81140d3bcf08894f4378eb36428 (diff)
Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU updates from Paul E. McKenney: "This series greatly reduces the performance degradation of Tree SRCU on a CPU-hotplug stress test. The effect was not subtle: Mike Galbraith measured Classic SRCU at 55 seconds and Tree SRCU at more than 16 -minutes- for this test. Mike collected ftrace data that showed that Classic SRCU was auto-expediting invocations of synchronize_srcu() that found SRCU completely idle. This series therefore adds this auto-expedite capability to Tree SRCU, bringing the performance shortfall to less than ten seconds, which is a great improvement over the initial shortfall of 15 minutes." Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/srcuclassic.h')
-rw-r--r--include/linux/srcuclassic.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/srcuclassic.h b/include/linux/srcuclassic.h
index 41cf99930f34..5753f7322262 100644
--- a/include/linux/srcuclassic.h
+++ b/include/linux/srcuclassic.h
@@ -98,4 +98,18 @@ void synchronize_srcu_expedited(struct srcu_struct *sp);
void srcu_barrier(struct srcu_struct *sp);
unsigned long srcu_batches_completed(struct srcu_struct *sp);
+static inline void srcutorture_get_gp_data(enum rcutorture_type test_type,
+ struct srcu_struct *sp, int *flags,
+ unsigned long *gpnum,
+ unsigned long *completed)
+{
+ if (test_type != SRCU_FLAVOR)
+ return;
+ *flags = 0;
+ *completed = sp->completed;
+ *gpnum = *completed;
+ if (sp->batch_queue.head || sp->batch_check0.head || sp->batch_check0.head)
+ (*gpnum)++;
+}
+
#endif