From: Andrew Morton <akpm@linux-foundation.org>
To: john stultz <johnstul@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Roman Zippel <zippel@linux-m68k.org>
Subject: Re: [PATCH 2/2] Introduce CLOCK_MONOTONIC_RAW
Date: Tue, 18 Mar 2008 19:43:26 -0700 [thread overview]
Message-ID: <20080318194326.9b20ae7d.akpm@linux-foundation.org> (raw)
In-Reply-To: <1205878420.28128.117.camel@localhost>
On Tue, 18 Mar 2008 15:13:40 -0700 john stultz <johnstul@us.ibm.com> wrote:
> Here's my CLOCK_MONOTONIC_RAW, including some suggested changes from
> Roman.
>
> Andrew, if there are not major objections, could you add it to your
> 2.6.26 pending list?
>
> thanks
> -john
>
>
> In talking with Josip Loncaric, and his work on clock synchronization
> (see btime.sf.net), he mentioned that for really close synchronization,
> it is useful to have access to "hardware time", that is a notion of time
> that is not in any way adjusted by the clock slewing done to keep close
> time sync.
>
> Part of the issue is if we are using the kernel's ntp adjusted
> representation of time in order to measure how we should correct time,
> we can run into what Paul McKenney aptly described as "Painting a road
> using the lines we're painting as the guide".
>
> I had been thinking of a similar problem, and was trying to come up with
> a way to give users access to a purely hardware based time
> representation that avoided users having to know the underlying
> frequency and mask values needed to deal with the wide variety of
> possible underlying hardware counters.
>
> My solution is to introduce CLOCK_MONOTONIC_RAW. This exposes a
> nanosecond based time value, that increments starting at bootup and has
> no frequency adjustments made to it what so ever.
>
> The time is accessed from userspace via the posix_clock_gettime()
> syscall, passing CLOCK_MONOTONIC_RAW as the clock_id.
>
> This patch depends on the mult_orig patch, just sent a moment ago.
alpha:
kernel/built-in.o: In function `posix_get_monotonic_raw':
: undefined reference to `getrawmonotonic'
kernel/built-in.o: In function `posix_get_monotonic_raw':
: undefined reference to `getrawmonotonic'
presumably busted for all CONFIG_GENERIC_TIME=n architectures.
Couldn't see a quick fix so I dropped it.
next prev parent reply other threads:[~2008-03-19 19:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 22:11 [PATCH 1/2] Keep track of original clocksource frequency john stultz
2008-03-18 22:13 ` [PATCH 2/2] Introduce CLOCK_MONOTONIC_RAW john stultz
2008-03-19 2:43 ` Andrew Morton [this message]
2008-03-19 3:01 ` john stultz
2008-04-02 11:39 ` [PATCH 1/2] Introduce clocksource_forward_now Roman Zippel
2008-04-02 16:01 ` John Stultz
2008-04-03 21:07 ` Andrew Morton
2008-04-02 11:50 ` [PATCH 2/2] Introduce CLOCK_MONOTONIC_RAW Roman Zippel
2008-04-02 16:01 ` John Stultz
2008-04-02 16:37 ` Roman Zippel
2008-04-03 21:11 ` Andrew Morton
2008-04-02 11:20 ` [PATCH 1/2] Keep track of original clocksource frequency Roman Zippel
2008-04-02 15:38 ` John Stultz
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=20080318194326.9b20ae7d.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zippel@linux-m68k.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
Powered by JetHome