Commit ca7e716c authored by Linus Torvalds's avatar Linus Torvalds

Revert "sched_clock: prevent scd->clock from moving backwards"

This reverts commit 5b7dba4f, which
caused a regression in hibernate, reported by and bisected by Fabio
Comolli.

This revert fixes

 http://bugzilla.kernel.org/show_bug.cgi?id=12155
 http://bugzilla.kernel.org/show_bug.cgi?id=12149Bisected-by: default avatarFabio Comolli <fabio.comolli@gmail.com>
Requested-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5279585f
...@@ -119,12 +119,12 @@ static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now) ...@@ -119,12 +119,12 @@ static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now)
/* /*
* scd->clock = clamp(scd->tick_gtod + delta, * scd->clock = clamp(scd->tick_gtod + delta,
* max(scd->tick_gtod, scd->clock), * max(scd->tick_gtod, scd->clock),
* max(scd->clock, scd->tick_gtod + TICK_NSEC)); * scd->tick_gtod + TICK_NSEC);
*/ */
clock = scd->tick_gtod + delta; clock = scd->tick_gtod + delta;
min_clock = wrap_max(scd->tick_gtod, scd->clock); min_clock = wrap_max(scd->tick_gtod, scd->clock);
max_clock = wrap_max(scd->clock, scd->tick_gtod + TICK_NSEC); max_clock = scd->tick_gtod + TICK_NSEC;
clock = wrap_max(clock, min_clock); clock = wrap_max(clock, min_clock);
clock = wrap_min(clock, max_clock); clock = wrap_min(clock, max_clock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment