Message ID | 1269902636-7917-2-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Delegated to: | Andy Whitcroft |
Headers | show |
Queued for 2.6.32.11. Though might be acceptable pre-stable. Colin King wrote: > BugLink: http://bugs.launchpad.net/bugs/551068 > > Stop spurious sotlock messages due to math overflow when TSC > warps coming out of S3. > > This is a backport of the upstream commit > 8c2eb4805d422bdbf60ba00ff233c794d23c3c00 - the posting states: > > Ensure additions on touch_ts do not overflow. This can occur > when the top 32 bits of the TSC reach 0xffffffff causing > additions to touch_ts to overflow and this in turn generates > spurious softlockup warnings. > > Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> > Cc: Eric Dumazet <eric.dumazet@gmail.com> > Cc: <stable@kernel.org> > LKML-Reference: <1268994482.1798.6.camel@lenovo> > Signed-off-by: Ingo Molnar <mingo@elte.hu> > Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- > kernel/softlockup.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/softlockup.c b/kernel/softlockup.c > index 88796c3..db592e0 100644 > --- a/kernel/softlockup.c > +++ b/kernel/softlockup.c > @@ -140,11 +140,11 @@ void softlockup_tick(void) > * Wake up the high-prio watchdog task twice per > * threshold timespan. > */ > - if (now > touch_timestamp + softlockup_thresh/2) > + if (time_after(now - softlockup_thresh/2, touch_timestamp)) > wake_up_process(per_cpu(watchdog_task, this_cpu)); > > /* Warn about unreasonable delays: */ > - if (now <= (touch_timestamp + softlockup_thresh)) > + if (time_before_eq(now - softlockup_thresh, touch_timestamp)) > return; > > per_cpu(print_timestamp, this_cpu) = touch_timestamp;
On Tue, Mar 30, 2010 at 12:43:56AM +0200, Colin King wrote: > BugLink: http://bugs.launchpad.net/bugs/551068 > > Stop spurious sotlock messages due to math overflow when TSC > warps coming out of S3. > > This is a backport of the upstream commit > 8c2eb4805d422bdbf60ba00ff233c794d23c3c00 - the posting states: > > Ensure additions on touch_ts do not overflow. This can occur > when the top 32 bits of the TSC reach 0xffffffff causing > additions to touch_ts to overflow and this in turn generates > spurious softlockup warnings. > > Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> > Cc: Eric Dumazet <eric.dumazet@gmail.com> > Cc: <stable@kernel.org> > LKML-Reference: <1268994482.1798.6.camel@lenovo> > Signed-off-by: Ingo Molnar <mingo@elte.hu> > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > kernel/softlockup.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/softlockup.c b/kernel/softlockup.c > index 88796c3..db592e0 100644 > --- a/kernel/softlockup.c > +++ b/kernel/softlockup.c > @@ -140,11 +140,11 @@ void softlockup_tick(void) > * Wake up the high-prio watchdog task twice per > * threshold timespan. > */ > - if (now > touch_timestamp + softlockup_thresh/2) > + if (time_after(now - softlockup_thresh/2, touch_timestamp)) > wake_up_process(per_cpu(watchdog_task, this_cpu)); > > /* Warn about unreasonable delays: */ > - if (now <= (touch_timestamp + softlockup_thresh)) > + if (time_before_eq(now - softlockup_thresh, touch_timestamp)) > return; > > per_cpu(print_timestamp, this_cpu) = touch_timestamp; Seems reasonable to me, probabally take this as a pre-stable due to the beta-2 deadline. Acked-by: Andy Whitcroft <apw@canonical.com> -apw
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 88796c3..db592e0 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c @@ -140,11 +140,11 @@ void softlockup_tick(void) * Wake up the high-prio watchdog task twice per * threshold timespan. */ - if (now > touch_timestamp + softlockup_thresh/2) + if (time_after(now - softlockup_thresh/2, touch_timestamp)) wake_up_process(per_cpu(watchdog_task, this_cpu)); /* Warn about unreasonable delays: */ - if (now <= (touch_timestamp + softlockup_thresh)) + if (time_before_eq(now - softlockup_thresh, touch_timestamp)) return; per_cpu(print_timestamp, this_cpu) = touch_timestamp;