From: Alexander Holler <holler@ahsoftware.de>
To: linux-kernel@vger.kernel.org
Cc: rtc-linux@googlegroups.com, John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: adjusting the monotonic system time (from inside the kernel)
Date: Mon, 06 May 2013 17:05:26 +0200 [thread overview]
Message-ID: <5187C6B6.7070605@ahsoftware.de> (raw)
In-Reply-To: <5187B813.8000907@ahsoftware.de>
Am 06.05.2013 16:02, schrieb Alexander Holler:
>
> But I would prefer the following:
>
> hw-clock --> kernel -> system-time
>
> Problem is that the hw-clock in question doesn't offer something like a
> tick. It just might send a timestamp with millisecond precision whenever
> it wants.
>
> Because I don't want to reinvent the wheel and because I think there are
> some people which already have spend some thoughts on similiar things,
> I'm asking here before I try to implement something which then never
> might find it's way into the mainline kernel.
>
> Any hints, suggestions, whatever?
To offer something for discussion I'm thinking about:
When a timestamp with millisecond precision is received, instruct the
kernel to adjust the system time in the next minute for the calculated
offset.
Question here would be what to choose as window to adjust the time (the
"next minute" above"). I think that should depend on the offset. But
what are acceptable values? One minute to adjust the clock for offsets
up to +-500ms? Two minutes if the offset is one second? ...
As I never spend a thought about such before, I just don't have any
pointers what would be acceptable.
Regards,
Alexander
next prev parent reply other threads:[~2013-05-06 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 14:02 adjusting the monotonic system time (from inside the kernel) Alexander Holler
2013-05-06 15:05 ` Alexander Holler [this message]
2013-06-07 23:49 ` John Stultz
2013-06-08 8:23 ` [rtc-linux] " Alexander Holler
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=5187C6B6.7070605@ahsoftware.de \
--to=holler@ahsoftware.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=tglx@linutronix.de \
/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