Re: Bisected post-3.9 regression: Resume takes 5 times as much timeas with v3.9

From: Borislav Petkov
Date: Sun May 12 2013 - 13:21:11 EST


On Sun, May 12, 2013 at 06:56:40PM +0200, BjÃrn Mork wrote:
> Borislav Petkov <bp@xxxxxxxxx> writes:
> > On Sun, May 12, 2013 at 06:13:34PM +0200, BjÃrn Mork wrote:
> >> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> >> index 6934238..2dcbf84 100644
> >> --- a/kernel/rcutree.c
> >> +++ b/kernel/rcutree.c
> >> @@ -3103,9 +3103,11 @@ static int rcu_pm_notify(struct notifier_block *self,
> >> {
> >> switch (action) {
> >> case PM_HIBERNATION_PREPARE:
> >> + case PM_SUSPEND_PREPARE:
> >> rcu_expedited = 1;
> >> break;
> >> - case PM_POST_RESTORE:
> >> + case PM_POST_HIBERNATION:
> >> + case PM_POST_SUSPEND:
> >> rcu_expedited = 0;
> >> break;
> >> default:
> >
> > If I'm reading Documentation/power/notifiers.txt correctly, we only need
> > PM_HIBERNATION_PREPARE when we go to sleep (whatever hibernation method
> > we use) and PM_POST_HIBERNATION when we restore.
>
> Well, that's not the way I read it. And testing also supports that.
>
> Adding the above to your patch makes restore from suspend use < 3
> seconds again. Using only PM_HIBERNATION_PREPARE had no effect on the
> restore from suspend time, still measured at around 15 seconds on my
> laptop.

Hmm, that could be because suspend.c does PM_SUSPEND_PREPARE and
hibernate.c does PM_HIBERNATION_PREPARE. So the statement

"PM_HIBERNATION_PREPARE The system is going to hibernate or suspend,"

is wrong.

Hi Rafael, it seems to me that if we need to do something for both sleep
methods, we have different notifier states and we have to add them both
if we want to do stuff for both, correct?

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
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/