public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: linux@horizon.com
To: johnstul@us.ibm.com, zippel@linux-m68k.org
Cc: linux-kernel@vger.kernel.org, linux@horizon.com, theotso@us.ibm.com
Subject: Re: Linux time code
Date: 28 Aug 2006 23:28:29 -0400	[thread overview]
Message-ID: <20060829032829.28776.qmail@science.horizon.com> (raw)
In-Reply-To: <1156804609.16398.17.camel@localhost.localdomain>

> While its possible to smooth out the leapsecond (which would be useful
> to many folks), the problem is one's system would then diverge from UTC
> for that leapsecond. 

The Posix-mandated behaviour *requires* diverging from UTC for some
time period around the leap second.  All you can do is decide how
to schedule the divergence.

Note that any real clock diverges from UTC by some amount, and
POSIX's denial of leap seconds


> The idea he's proposing here is to keep both UTC and UTS as separate
> clock ids, allowing apps to choose which standard (well, I UTS isn't
> quite a standard) they want to follow.
> 
> I think this would be quite useful, as I've seen a number of requests
> where users don't want the leapsecond inconsistency, and others where
> they need to strictly follow UTC.

I think smoothing it out should be the default for Posix-specified things
like gettimeofday() and CLOCK_REALTIME, since that is, as I said, the
least insane way to deal with the contradictory POSIX requirements.

But also provide an explicit CLOCK_UTC and CLOCK_UTS for people who care
and want to be specific.  adjtimex() should stay UTC, since it returns leap
second information.

> I think having TAI would be nice too, but that requires quite a bit of
> infrastructure work (NTP distributing absolute leapsecond counts, etc).

Yes, but it would be damned nice.  To implement leap seconds at all,
you need to have notice of at least the next one.  The Olson time
zone files, which have a similar several-month advance-notice schedule,
include leap-second information.


Combining messages:
> With the new clocksource code, we can (currently just i386, but the
> architecture is generic and I'm working on the other arches) make use of
> continuous clocksources for accumulating time instead of having the deal
> with the problematic PIT (as well as the lost ticks issue).

If it's there, it's great, but what about i386EX embedded boards and
the like?  It's approximately manageable on uniprocessor, but can
I be sure there's always something (what?) better than the PIT on
*every* SMP system?

I need to study what you've done and see how to use it.

> Maybe I'm missing what you're proposing, but I think "that pit of
> madness" can now be avoided. :)

I'm just trying to start with the best possible worst-case situation,
and then improve on things from there.  Implement the robust slow path
first, then add fast paths for common cases.

  reply	other threads:[~2006-08-29  3:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23  6:25 Linux time code linux
2006-08-23 18:29 ` john stultz
2006-08-24  2:35   ` linux
2006-08-28 11:39     ` Roman Zippel
2006-08-28 22:36       ` john stultz
2006-08-29  3:28         ` linux [this message]
2006-08-29 13:15           ` Theodore Tso
2006-08-29 15:18             ` linux
2006-08-29 19:23           ` john stultz
2006-08-29 14:43         ` Roman Zippel
2006-08-26  0:17   ` linux
2006-08-28 22:41     ` john stultz
2006-08-26  3:46   ` linux
  -- strict thread matches above, loose matches on Subject: below --
2006-08-16 12:26 Ulrich Windl
2006-08-16 12:36 ` Oleg Verych
2006-08-16 15:35   ` H. Peter Anvin
2006-08-16 15:12     ` Oleg Verych
2006-08-16 19:53 ` john stultz
2006-08-17  7:20   ` Ulrich Windl
2006-08-17 19:15     ` john stultz
2006-08-17 11:43   ` Roman Zippel
2006-08-17 21:58     ` john stultz
2006-08-17 22:11       ` Jesse Barnes
2006-08-17 22:32         ` john stultz
2006-08-17 22:50           ` Jesse Barnes
2006-08-17 23:02             ` john stultz
2006-08-20 17:14               ` Roman Zippel
2006-08-20 17:10       ` Roman Zippel

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=20060829032829.28776.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=theotso@us.ibm.com \
    --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