diff options
author | Feng Tang <feng.tang@intel.com> | 2013-03-12 07:56:48 +0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2013-03-16 03:51:29 +0400 |
commit | e445cf1c4257cc0238d72e4129eb4739f46fd3de (patch) | |
tree | 5ff9c120a867939996d83dae6e885e81177c1819 /include/linux/timekeeper_internal.h | |
parent | 82f9c080b22a5b859ae2b50822dfb6b812898fdb (diff) | |
download | linux-e445cf1c4257cc0238d72e4129eb4739f46fd3de.tar.xz |
timekeeping: utilize the suspend-nonstop clocksource to count suspended time
There are some new processors whose TSC clocksource won't stop during
suspend. Currently, after system resumes, kernel will use persistent
clock or RTC to compensate the sleep time, but with these nonstop
clocksources, we could skip the special compensation from external
sources, and just use current clocksource for time recounting.
This can solve some time drift bugs caused by some not-so-accurate or
error-prone RTC devices.
The current way to count suspended time is first try to use the persistent
clock, and then try the RTC if persistent clock can't be used. This
patch will change the trying order to:
suspend-nonstop clocksource -> persistent clock -> RTC
When counting the sleep time with nonstop clocksource, use an accurate way
suggested by Jason Gunthorpe to cover very large delta cycles.
Signed-off-by: Feng Tang <feng.tang@intel.com>
[jstultz: Small optimization, avoiding re-reading the clocksource]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/timekeeper_internal.h')
0 files changed, 0 insertions, 0 deletions