[RFC][PATCH 0/2] Avoid accumulating drift in suspend/resume
From: John Stultz
Date: Wed Jun 01 2011 - 02:08:15 EST
Arve Hjønnevåg noted that in the suspend/resume path, we're likely to see
half-second errors from each read of the RTC. If a system is frequently
suspended, these errors will accumulate quickly.
Arve's solution was to compare the time delta between the system time
and the RTC, for each suspend. If the difference is small, use the same
delta for each suspend. This consistency avoids the error from accumulating.
This patch set implements Arve's suggestion for both the RTC and persistent
clock suspend paths.
Initial tests show that this improves time accuracy over many repeated
suspends. So while testing continues, I just wanted to send this out for
review and feedback.
thanks
-john
CC: Arve Hjønnevåg <arve@xxxxxxxxxxx>
CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
John Stultz (2):
time: Avoid accumulating time drift in suspend/resume
rtc: Avoid accumulating time drift in suspend/resume
drivers/rtc/class.c | 65 +++++++++++++++++++++++++++++++++------------
kernel/time/timekeeping.c | 22 +++++++++++++++
2 files changed, 70 insertions(+), 17 deletions(-)
--
1.7.3.2.146.gca209
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/