From: Thomas Graziadei <thomas.graziadei@omicronenergy.com>
To: John Stultz <john.stultz@linaro.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Tony Luck <tony.luck@intel.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH] timekeeping: Fix 1ns/tick drift with GENERIC_TIME_VSYSCALL_OLD
Date: Wed, 1 Jun 2016 13:43:24 +0200 [thread overview]
Message-ID: <574ECA5C.4040005@omicronenergy.com> (raw)
In-Reply-To: <CALAqxLX8XV7Ay5gmsZVTYLwwPKr-FSKfCWYwJtNpNxruD1N5Ag@mail.gmail.com>
On 06/01/2016 01:11 AM, John Stultz wrote:
> On Tue, May 31, 2016 at 6:06 AM, Thomas Graziadei
> <thomas.graziadei@omicronenergy.com> wrote:
>> From: Thomas Graziadei <thomas.graziadei@omicronenergy.com>
>>
>> The user notices the problem in a raw and real time drift, calling
>> clock_gettime with CLOCK_REALTIME / CLOCK_MONOTONIC_RAW on a system
>> with no ntp correction taking place (no ntpd or ptp stuff running).
>
> Hmm.. Curious. Was it actually drifting, or was it just
> oscillating/ringing near the RAW clock's value?
It is actually drifting.
This is the output from a little test program:
realtime : 1464775074:846282133
raw time : 1054:851963700
drift_real: 999402ns
total duration: 1000s 158517540ns
>
>> The problem is, that old_vsyscall_fixup adds an extra 1ns even though
>> xtime_nsec is already held in full nsecs and the remainder in this
>> case is 0. Do the rounding up buisness only if needed.
>
> The patch looks ok. But I'm curious what architecture you were seeing
> this on (ia64, powerpc?), as it would be much nicer to have those
> architectures migrate off of the old low-res vsyscall calculation and
> use the newer method with sub-ns precision, instead of trying to
> further fix up the deprecated method.
>
> I had submitted a patch to convert ia64 awhile back, but I don't
> recall getting much feedback.
>
We are using a powerpc architecture.
I guess you are right, it would be nicer to use the new method but then
on the other hand, this timing topic is rather new to me.
> thanks
> -john
>
thanks,
Thomas
next prev parent reply other threads:[~2016-06-01 12:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 13:06 [PATCH] timekeeping: Fix 1ns/tick drift with GENERIC_TIME_VSYSCALL_OLD Thomas Graziadei
2016-05-31 23:11 ` John Stultz
2016-06-01 11:43 ` Thomas Graziadei [this message]
2016-06-17 20:55 ` 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=574ECA5C.4040005@omicronenergy.com \
--to=thomas.graziadei@omicronenergy.com \
--cc=benh@kernel.crashing.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.