summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-06-24 12:26:11 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-07-07 18:13:44 -0400
commitfbce7497ee5af800a1c350c73f3c3f103cb27a15 (patch)
treeb65cf880d3b4b0afd1becd66f1119f9d1ec9d853 /Documentation
parent4a81e8328d3791a4f99bf5b436d050f6dc5ffea3 (diff)
rcu: Parallelize and economize NOCB kthread wakeups
An 80-CPU system with a context-switch-heavy workload can require so many NOCB kthread wakeups that the RCU grace-period kthreads spend several tens of percent of a CPU just awakening things. This clearly will not scale well: If you add enough CPUs, the RCU grace-period kthreads would get behind, increasing grace-period latency. To avoid this problem, this commit divides the NOCB kthreads into leaders and followers, where the grace-period kthreads awaken the leaders each of whom in turn awakens its followers. By default, the number of groups of kthreads is the square root of the number of CPUs, but this default may be overridden using the rcutree.rcu_nocb_leader_stride boot parameter. This reduces the number of wakeups done per grace period by the RCU grace-period kthread by the square root of the number of CPUs, but of course by shifting those wakeups to the leaders. In addition, because the leaders do grace periods on behalf of their respective followers, the number of wakeups of the followers decreases by up to a factor of two. Instead of being awakened once when new callbacks arrive and again at the end of the grace period, the followers are awakened only at the end of the grace period. For a numerical example, in a 4096-CPU system, the grace-period kthread would awaken 64 leaders, each of which would awaken its 63 followers at the end of the grace period. This compares favorably with the 79 wakeups for the grace-period kthread on an 80-CPU system. Reported-by: Rik van Riel <riel@redhat.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kernel-parameters.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 910c3829f81d..770662c42c9f 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2802,6 +2802,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2802 quiescent states. Units are jiffies, minimum 2802 quiescent states. Units are jiffies, minimum
2803 value is one, and maximum value is HZ. 2803 value is one, and maximum value is HZ.
2804 2804
2805 rcutree.rcu_nocb_leader_stride= [KNL]
2806 Set the number of NOCB kthread groups, which
2807 defaults to the square root of the number of
2808 CPUs. Larger numbers reduces the wakeup overhead
2809 on the per-CPU grace-period kthreads, but increases
2810 that same overhead on each group's leader.
2811
2805 rcutree.qhimark= [KNL] 2812 rcutree.qhimark= [KNL]
2806 Set threshold of queued RCU callbacks beyond which 2813 Set threshold of queued RCU callbacks beyond which
2807 batch limiting is disabled. 2814 batch limiting is disabled.