Message ID | 53C9ACCA.3070306@codeaurora.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 07/18/2014 04:24 PM, Stephen Boyd wrote: > On 07/18/14 15:42, John Stultz wrote: >> If its a regression (and needs -stable backports) it needs to go in via >> tip/timers/urgent, and not via the regular merge window. >> >> Whats the additional risk -stable wise for canceling the timer during >> suspend and starting it back up during resume? >> > I'd say close to zero given that we'd only be making the timer run a > little bit later and we have slack in there already. Here's that version. Ok, thanks. I'll try to do a closer review it and get it queued. Is there anyone who might be able to validate this and provide a Tested-by: ? thanks -john
On 07/18/14 17:14, John Stultz wrote: > On 07/18/2014 04:24 PM, Stephen Boyd wrote: >> On 07/18/14 15:42, John Stultz wrote: >>> If its a regression (and needs -stable backports) it needs to go in via >>> tip/timers/urgent, and not via the regular merge window. >>> >>> Whats the additional risk -stable wise for canceling the timer during >>> suspend and starting it back up during resume? >>> >> I'd say close to zero given that we'd only be making the timer run a >> little bit later and we have slack in there already. Here's that version. > Ok, thanks. I'll try to do a closer review it and get it queued. Is > there anyone who might be able to validate this and provide a Tested-by: ? > Maybe someone from Linaro can give a Tested-by? I basically did this: # grep -A1 'sched_clock' /proc/timer_list && echo mem > /sys/power/state && grep -A1 'sched_clock' /proc/timer_list and made sure that the expires time was reset.
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index 445106d2c729..01d2d15aa662 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c @@ -191,7 +191,8 @@ void __init sched_clock_postinit(void) static int sched_clock_suspend(void) { - sched_clock_poll(&sched_clock_timer); + update_sched_clock(); + hrtimer_cancel(&sched_clock_timer); cd.suspended = true; return 0; } @@ -199,6 +200,7 @@ static int sched_clock_suspend(void) static void sched_clock_resume(void) { cd.epoch_cyc = read_sched_clock(); + hrtimer_start(&sched_clock_timer, cd.wrap_kt, HRTIMER_MODE_REL); cd.suspended = false; }