Re: [uClinux-dev] Timekeeping problem: time runs too fast

2010-04-28 Thread Daniel Glöckner
On Wed, Apr 28, 2010 at 10:20:53AM +0200, Stephane Lambert wrote:
> Hello all,
> I'm working on the porting of uClinux 2.6.19 for a new architecture.

Sorry, but why do you port an ancient version of Linux to a
new architecture? Did you start four years ago??

> Does this timekeeping mechanism perfectly functionnal for this version
> of the kernel?

I don't know. I know for sure it did work in 2.6.27 and it
definitely does work in 2.6.33.

  Daniel
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


Re: [uClinux-dev] Timekeeping problem: time runs too fast

2010-04-28 Thread Philippe De Muyter
> I have an other question concerning the macro CLOCK_TICK_RATE
> (include/asm-'arch-name'/timex.h):
> this macro seems to be architecture dependant. It's generally 1193180.
> 
> What is this macro used for?

For ntp-based time synchronisation.

> What value should I give to it?

CLOCK_TICK_RATE should give the underlying frequency of the tick timer.
i.e. the frequency of the hardware input clock of your tick timer

Philippe

-- 
Philippe De Muyter  phdm at macqel dot be  Tel +32 27029044
Macq Electronique SA  rue de l'Aeronef 2  B-1140 Bruxelles  Fax +32 27029077
___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


[uClinux-dev] Timekeeping problem: time runs too fast

2010-04-28 Thread Stephane Lambert
Hello all,
I'm working on the porting of uClinux 2.6.19 for a new architecture.
The system is booting without problems, but I have a problem
concerning timekeeping.
Indeed, the date command shows that time runs too fast
(5 sec in reality for around 10 minutes in Linux...).

So I have read documentation about timekeeping, the important things
seems to be the following:

 - jiffies -> number of timer interrupts (ticks) since the system
startup.

 - xtime.tv_sec -> number of seconds elapsed since Epoch (1970, jan 1
00:00:00)

 - xtime.tv_nsec -> number of nanoseconds elapsed during the current second.

These variables are updated at each timer interrupts, notably in
update_wall_time() where xtime fields are modified in an algorithm
involving the kernel clock (clocksource).
Does this timekeeping mechanism perfectly functionnal for this version
of the kernel?

I have an other question concerning the macro CLOCK_TICK_RATE
(include/asm-'arch-name'/timex.h):
this macro seems to be architecture dependant. It's generally 1193180.

What is this macro used for?
What value should I give to it?

Thanks in advance for your help.
Regards.



___
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev