public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/2] Avoid accumulating drift in suspend/resume
@ 2011-06-01  6:07 John Stultz
  2011-06-01  6:07 ` [PATCH 1/2] time: Avoid accumulating time " John Stultz
  2011-06-01  6:07 ` [PATCH 2/2] rtc: " John Stultz
  0 siblings, 2 replies; 5+ messages in thread
From: John Stultz @ 2011-06-01  6:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: John Stultz, Arve Hj�nnev�g, Thomas Gleixner

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1110 bytes --]

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@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-02  1:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01  6:07 [RFC][PATCH 0/2] Avoid accumulating drift in suspend/resume John Stultz
2011-06-01  6:07 ` [PATCH 1/2] time: Avoid accumulating time " John Stultz
2011-06-01  6:07 ` [PATCH 2/2] rtc: " John Stultz
2011-06-02  0:54   ` Arve Hjønnevåg
2011-06-02  1:14     ` John Stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox