linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: Nicolas Mailhot <nicolas.mailhot@laposte.net>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Roman Zippel <zippel@linux-m68k.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 00/21] hrtimer - High-resolution timer subsystem
Date: Wed, 14 Dec 2005 17:11:21 -0800	[thread overview]
Message-ID: <43A0C2B9.1070508@mvista.com> (raw)
In-Reply-To: <34966.192.54.193.35.1134554604.squirrel@rousalka.dyndns.org>

Nicolas Mailhot wrote:
> On Mer 14 décembre 2005 00:38, George Anzinger wrote:
> 
>>Nicolas Mailhot wrote:
>>
>>>"This is your interpretation and I disagree.
>>>
>>>If I set up a timer with a 24 hour interval, which should go off
>>>everyday at 6:00 AM, then I expect that this timer does this even when
>>>the clock is set e.g. by daylight saving. I think, that this is a
>>>completely valid interpretation and makes a lot of sense from a
>>>practical point of view. The existing implementation does it that way
>>>already, so why do we want to change this ?"
>>
>>I think that there is a miss understanding here.  The kernel timers,
>>at this time, do not know or care about daylight savings time.  This
>>is not really a clock set but a time zone change which does not
>>intrude on the kernels notion of time (that being, more or less UTC).
> 
> 
> Probably. I freely admit I didn't follow the whole discussion. But the
> example quoted strongly hinted at fudging timers in case of DST, which
> would be very bad if done systematically and not on explicit user request.
> 
> What I meant to write is "do not assume any random clock adjustement
> should change timer duration". Some people want it, others definitely
> don't.
> 
> I case of kernel code legal time should be pretty much irrelevant, so if
> 24h timers are adjusted so they still go of at the same legal hour, that
> would be a bug IMHO.

I am not quite sure what you are asking for here, but, as things set 
today, the kernels notion of time starts with a set time somewhere 
around boot up, be it from RT clock hardware or, possibly some script 
that quires some other system to find the time (NTP or otherwise). 
This time is then kept up to date by timer ticks which are assumed to 
have some fixed duration with, possibly, small drift corrections via 
NTP code.  And then there is the random settimeofday, which the kernel 
has to assume is "needed" and correct.

On top of this the POSIX clocks and timers code implements clocks 
which read the current time and a system relative time called 
monotonic time.  We, by convention, roll the monotonic time and uptime 
together, and, assuming that the NTP corrections are telling us 
something about our "rock", we correct both the monotonic time and the 
time of day as per the NTP requests.

Timers are then built on top of these clocks in two ways, again, as 
per the POSIX standard: 1) the relative timer, and 2) the absolute 
timer.  For the relative timer, the specified expiry time is defined 
to be _now_ plus the given interval.  For the absolute timer the 
expiry time is defined as that time when the given clock reaches the 
requested time.

The only thing in here that might relate to your "legal" hour is that 
we adjust (via NTP) the clocks so that they, supposedly, run at the 
NBS (or is it the Naval Observatory) rate, give or take a small, 
hopefully, well defined error.
> 

-- 
George Anzinger   george@mvista.com
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/

  reply	other threads:[~2005-12-15  1:11 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13 12:45 [patch 00/21] hrtimer - High-resolution timer subsystem Nicolas Mailhot
2005-12-13 23:38 ` George Anzinger
2005-12-14  8:58   ` Kyle Moffett
2005-12-14 10:03   ` Nicolas Mailhot
2005-12-15  1:11     ` George Anzinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-12-06  0:01 tglx
2005-12-06 17:32 ` Roman Zippel
2005-12-06 19:07   ` Ingo Molnar
2005-12-07  3:05     ` Roman Zippel
2005-12-08  5:18       ` Paul Jackson
2005-12-08  8:12         ` Ingo Molnar
2005-12-08  9:26       ` Ingo Molnar
2005-12-08 13:08         ` Roman Zippel
2005-12-08 15:36           ` Steven Rostedt
2005-12-06 22:10   ` Thomas Gleixner
2005-12-07  3:11     ` Roman Zippel
2005-12-06 22:28   ` Thomas Gleixner
2005-12-07  9:31     ` Andrew Morton
2005-12-07 10:11       ` Ingo Molnar
2005-12-07 10:20         ` Ingo Molnar
2005-12-07 10:23         ` Nick Piggin
2005-12-07 10:49           ` Ingo Molnar
2005-12-07 11:09             ` Nick Piggin
2005-12-07 11:33               ` Ingo Molnar
2005-12-07 11:40                 ` Nick Piggin
2005-12-07 13:06                 ` Roman Zippel
2005-12-07 12:40               ` Roman Zippel
2005-12-07 23:12                 ` Nick Piggin
2005-12-07 12:18     ` Roman Zippel
2005-12-07 16:55       ` Ingo Molnar
2005-12-07 17:17         ` Roman Zippel
2005-12-07 17:57           ` Ingo Molnar
2005-12-07 18:18             ` Roman Zippel
2005-12-07 18:02           ` Paul Baxter
2005-12-09 17:23       ` Thomas Gleixner
2005-12-12 13:39         ` Roman Zippel
2005-12-12 16:42           ` Thomas Gleixner
2005-12-12 18:37             ` Thomas Gleixner
2005-12-13  1:25             ` George Anzinger
2005-12-13  9:18               ` Thomas Gleixner
2005-12-15  1:35               ` Roman Zippel
2005-12-15  2:29                 ` George Anzinger
2005-12-19 14:56                   ` Roman Zippel
2005-12-19 20:54                     ` George Anzinger
2005-12-21 23:03                       ` Roman Zippel
2005-12-22  4:30                         ` George Anzinger
2005-12-14 20:48             ` Roman Zippel
2005-12-14 22:30               ` Thomas Gleixner
2005-12-15  0:55                 ` George Anzinger
2005-12-15 14:18                 ` Steven Rostedt
2005-12-19 14:50                 ` Roman Zippel
2005-12-19 22:05                   ` Thomas Gleixner

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=43A0C2B9.1070508@mvista.com \
    --to=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.mailhot@laposte.net \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).