Skip to content

Commit

Permalink
time: Avoid scary backtraces when warning of > 11% adj
Browse files Browse the repository at this point in the history
Folks have been getting a number of warnings about time
adjustments > 11%. The WARN_ON leaves a big useless backtrace
so this patch removes it for a printk_once().

I'm still working to narrow down the cause of the > 11% adjustment.

Signed-off-by: John Stultz <john.stultz@linaro.org>
  • Loading branch information
John Stultz committed Mar 23, 2012
1 parent ad30dfa commit e919cfd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,13 +869,15 @@ static void timekeeping_adjust(s64 offset)
} else /* No adjustment needed */
return;

WARN_ONCE(timekeeper.clock->maxadj &&
(timekeeper.mult + adj > timekeeper.clock->mult +
timekeeper.clock->maxadj),
"Adjusting %s more then 11%% (%ld vs %ld)\n",
if (unlikely(timekeeper.clock->maxadj &&
(timekeeper.mult + adj >
timekeeper.clock->mult + timekeeper.clock->maxadj))) {
printk_once(KERN_WARNING
"Adjusting %s more than 11%% (%ld vs %ld)\n",
timekeeper.clock->name, (long)timekeeper.mult + adj,
(long)timekeeper.clock->mult +
timekeeper.clock->maxadj);
}
/*
* So the following can be confusing.
*
Expand Down

0 comments on commit e919cfd

Please sign in to comment.