From: johnstul@us.ibm.com (john stultz)
To: linux-arm-kernel@lists.infradead.org
Subject: Architecture specific implementations for tickless kernel and deferrable timers
Date: Fri, 29 Apr 2011 10:57:29 -0700 [thread overview]
Message-ID: <1304099849.30215.10.camel@work-vm> (raw)
In-Reply-To: <alpine.LFD.2.02.1104291902370.3005@ionos>
On Fri, 2011-04-29 at 19:05 +0200, Thomas Gleixner wrote:
> On Fri, 29 Apr 2011, Russell King - ARM Linux wrote:
>
> > On Fri, Apr 29, 2011 at 07:56:56PM +0530, Vikram Narayanan wrote:
> > > Can you also give some idea on how the system's RTC is hooked up with
> > > the generic timekeeping code.
> > > Is it hooked up in someway so that the walltime is calculated wrt the
> > > initial value of the RTC?
> >
> > I'd like to pass you over to the RTC folk, but I don't think they're
> > very active anymore.
> >
> > Suffice it to say that the RTC subsystem will set the system date/time
> > on initialization from the RTC device if one is provided. All I can
> > suggest is to look at drivers/rtc and include/linux/rtc.h for the
> > details. The MAINTAINERS file should list who is responsible for RTC
> > stuff as well as a mailing list for it.
>
> read_persistant_clock() is used for boottime / resume time readouts of
> a direct accessible RTC.
Right. read_persistent_clock has the benefit of being able to be read
with irqs off, which really is useful in reducing error in the
suspend/resume code. This makes it the preferred interface for
timekeeping.
> If the RTC sits behind a slow bus which is not accessible in early
> boot, then the RTC framework will take care of updating the time once
> the RTC becomes available.
Right. I sent out a patch "Add timekeeping_inject_sleeptime" that
corrects the irqs-required RTC paths on suspend and resume, which Thomas
just pulled into -tip for 2.6.40. It should improve things on the
non-read_persistent_clock/irq-required RTC side of things.
With 2.6.39 and earlier, the RTC code basically just calls
settimeofday() fairly late in the resume step, which makes a window for
resume timestamps to show the suspend time, as well as not properly
allowing us to account for the amount of time the system was sleeping
(which mucks up the boot time).
Of course, another issue with the RTC interface is that it
isbottlenecked at second granularity, which also hurts suspend/resume
time accuracy. Where as read_persistent_clock() allows for finer grained
resolution (if possible).
Let me know if you have any more questions I can try to answer.
thanks
-john
next prev parent reply other threads:[~2011-04-29 17:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 18:15 Architecture specific implementations for tickless kernel and deferrable timers Vikram Narayanan
2011-04-22 3:13 ` Jeff Ohlstein
2011-04-24 14:20 ` Vikram Narayanan
2011-04-26 20:37 ` Russell King - ARM Linux
2011-04-27 3:30 ` Vikram Narayanan
2011-04-27 7:25 ` Russell King - ARM Linux
2011-04-27 8:17 ` Thomas Gleixner
2011-04-28 13:31 ` Vikram Narayanan
2011-04-28 13:38 ` Russell King - ARM Linux
2011-04-28 13:54 ` Vikram Narayanan
2011-04-28 14:28 ` Russell King - ARM Linux
2011-04-28 17:29 ` Vikram Narayanan
2011-04-28 18:24 ` Russell King - ARM Linux
2011-04-29 14:26 ` Vikram Narayanan
2011-04-29 14:34 ` Russell King - ARM Linux
2011-04-29 15:07 ` Vikram Narayanan
2011-04-29 17:05 ` Thomas Gleixner
2011-04-29 17:05 ` Thomas Gleixner
2011-04-29 17:57 ` john stultz [this message]
2011-05-03 2:17 ` Vikram Narayanan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304099849.30215.10.camel@work-vm \
--to=johnstul@us.ibm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).