[PATCH tip/core/rcu 02/11] rcu: Expedite during suspend and resume only on smallish systems

From: Paul E. McKenney
Date: Sat Aug 17 2013 - 21:39:00 EST


From: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>

Expedited grace periods are of dubious benefit on very large systems,
so this commit restricts their automated use during suspend and resume
to systems of 256 or fewer CPUs.

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
---
kernel/rcutree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 69e4792..6ec33dc 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -3038,7 +3038,8 @@ static int rcu_pm_notify(struct notifier_block *self,
{
switch (action) {
case PM_HIBERNATION_PREPARE:
- rcu_expedited = 1;
+ if (nr_cpu_ids <= 256) /* Expediting bad for large systems. */
+ rcu_expedited = 1;
break;
case PM_POST_RESTORE:
rcu_expedited = 0;
--
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/