From 1a18db94231ca3dd6d3af5ad9d0953e8f973d662 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Mork?= Date: Tue, 14 May 2013 03:33:47 -0700 Subject: [PATCH] rcu: Switch to exedited grace periods for suspend as well as hibernation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit 587ff2cf ("rcu: Expedite grace periods during suspend/resume") enabled expedited grace periods for hibernation, but not for suspend. The same issue applies to both cases, so this commit simply applies the same logic by adding additional cases to the switch statement. Note that this commit also switches from PM_POST_RESTORE to the combination of PM_POST_HIBERNATION and PM_POST_SUSPEND. A separate patch from Borislav Petkov corrects the documentation to indicate that this is necessary. Signed-off-by: Bjørn Mork Signed-off-by: Paul E. McKenney --- kernel/rcutree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 63d27f168286..5b651e485360 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -2978,10 +2978,12 @@ static int rcu_pm_notify(struct notifier_block *self, { switch (action) { case PM_HIBERNATION_PREPARE: + case PM_SUSPEND_PREPARE: if (nr_cpu_ids <= 256) /* Expediting bad for large systems. */ rcu_expedited = 1; break; - case PM_POST_RESTORE: + case PM_POST_HIBERNATION: + case PM_POST_SUSPEND: rcu_expedited = 0; break; default: -- 2.39.5