All of lore.kernel.org
 help / color / mirror / Atom feed
From: J William Piggott <elseifthen@gmx.com>
To: Alexey Galakhov <agalakhov@gmail.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] hwclock: flush stdout in hwclock -c
Date: Tue, 21 Apr 2015 11:19:06 -0400	[thread overview]
Message-ID: <55366A6A.7010807@gmx.com> (raw)
In-Reply-To: <20150420092824.13611c6b@aga-ws-01>



On 04/20/2015 03:28 AM, Alexey Galakhov wrote:
> Hello William,
> 
> Am Sun, 19 Apr 2015 20:34:19 -0400
> schrieb J William Piggott <elseifthen@gmx.com>:
> 
>>  I've been advocating for the removal of the compare function. One of
>> my justifications for doing so is that it has been broken from day
>> one and therefore nobody can be using for anything.
>>
>>  So could you tell me how you are using it, and what useful purpose
>> it is serving for you?
> 
> We use it in an automated test of the Linux system time on an embedded
> system. Recently we fixed a kernel bug introduced by one of the 3rd
> party patches that caused a huge (0.01%-0.1%) drift of the
> CLOCK_REALTIME due to incorrect PLL initialization. The corresponding
> test based on hwclock's compare is now added to our automated test
> system. The test runs hwclock -c forever and fails if any drift
> anomality is discovered.
>

So you are using the Hardware Clock as a reference to detect anomalies
in the System Clock? You must have an exceptional Hardware Clock. It
sounds as though you are using NTP, why not compare NTP time directly to
your System time?

> Looks like hwclock -c works correctly at least in our case.

I assume then, that you are only using columns one and two, because
columns 3 and 4 are invalid output. If yes, then you are not using
hwclock -c for its actual 'compare' functionality, but only as a source
for timestamps. Your test could capture timestamps without hwclock's
compare function, yes?


> I think it
> could be rewritten using clock_gettime() instead of gettimeofday().
> 
> Regards,
> Alexey
> 

  reply	other threads:[~2015-04-21 15:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 15:26 [PATCH] hwclock: flush stdout in hwclock -c Alexey Galakhov
2015-04-20  0:34 ` J William Piggott
2015-04-20  7:28   ` Alexey Galakhov
2015-04-21 15:19     ` J William Piggott [this message]
2015-04-21 15:50       ` Alexey Galakhov
2015-04-21 19:12         ` J William Piggott
2015-04-27  8:27 ` Karel Zak
2015-04-27 21:27   ` J William Piggott
2015-04-27 21:42     ` Alexey Galakhov
2015-04-28  6:50       ` Bernhard Voelker
2015-04-28 11:27       ` J William Piggott

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=55366A6A.7010807@gmx.com \
    --to=elseifthen@gmx.com \
    --cc=agalakhov@gmail.com \
    --cc=util-linux@vger.kernel.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 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.