* question about linux time change
@ 2004-10-07 21:06 Chris Friesen
2004-10-12 23:35 ` George Anzinger
0 siblings, 1 reply; 3+ messages in thread
From: Chris Friesen @ 2004-10-07 21:06 UTC (permalink / raw)
To: george, Linux kernel
I have been asked to add the ability to notify userspace when the time of day
changes. The actual notification is the easy part. I'm having issues with
where exactly the time is really changed.
do_settimeofday() is pretty straightforward. No problems there.
adjtimex() with ADJ_OFFSET_SINGLESHOT mode seems reasonable as well.
adjtimex() with ADJ_OFFSET is a bit harder to follow. Can you give me any
pointers on what's going on with ADJ_OFFSET?
Thanks,
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about linux time change
2004-10-07 21:06 question about linux time change Chris Friesen
@ 2004-10-12 23:35 ` George Anzinger
2004-10-13 0:34 ` Chris Friesen
0 siblings, 1 reply; 3+ messages in thread
From: George Anzinger @ 2004-10-12 23:35 UTC (permalink / raw)
To: Chris Friesen; +Cc: Linux kernel
Chris Friesen wrote:
>
> I have been asked to add the ability to notify userspace when the time
> of day changes. The actual notification is the easy part. I'm having
> issues with where exactly the time is really changed.
Just what sort of time changes do you want to notify on? The ntp code "drifts"
time a lot. Do you want to know about this? If it is only cases where there is
a jump in time, you might do well to look at "clock_was_set()". It is in
kernel/posix-timers.c and is called when ever do_settimeofday() is called AND on
leap second calls.
You will even find code in there to push the ladder out of the softirq context.
>
> do_settimeofday() is pretty straightforward. No problems there.
> adjtimex() with ADJ_OFFSET_SINGLESHOT mode seems reasonable as well.
>
> adjtimex() with ADJ_OFFSET is a bit harder to follow. Can you give me
> any pointers on what's going on with ADJ_OFFSET?
>
> Thanks,
>
> Chris
>
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about linux time change
2004-10-12 23:35 ` George Anzinger
@ 2004-10-13 0:34 ` Chris Friesen
0 siblings, 0 replies; 3+ messages in thread
From: Chris Friesen @ 2004-10-13 0:34 UTC (permalink / raw)
To: george; +Cc: Linux kernel
George Anzinger wrote:
> Chris Friesen wrote:
>
>>
>> I have been asked to add the ability to notify userspace when the time
>> of day changes. The actual notification is the easy part. I'm having
>> issues with where exactly the time is really changed.
>
>
> Just what sort of time changes do you want to notify on? The ntp code
> "drifts" time a lot. Do you want to know about this? If it is only
> cases where there is a jump in time, you might do well to look at
> "clock_was_set()". It is in kernel/posix-timers.c and is called when
> ever do_settimeofday() is called AND on leap second calls.
>
> You will even find code in there to push the ladder out of the softirq
> context.
Cool. Will do.
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-13 0:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-07 21:06 question about linux time change Chris Friesen
2004-10-12 23:35 ` George Anzinger
2004-10-13 0:34 ` Chris Friesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox