Timers and skiping most time keeping.

J

Jog

Guest
Hi,

I am reading the linux kernel source for timers (normal and high resolution).

A feeling is: it is very complicated with very long calculations for a result which is.. fuzzy anyway. Obviously, the longer the calculations the worst the resulting time.
Linux is not real time anyway, nor lapic enables that goal either.

Question:
After the TSC initialization is correct, why not prevent core0 to change its frequency and use periodic interrupt on it (lapic) to update the whole system time? (we can modulate the interrupt frequency).

We would cache that result in shared memory in the highest resolution possible (nanosecond maybe) , and update it (by cpu zero) only on the next timer interrupt. This to avoid complicated time keeping calculations we can find in the scheduler/alarms.

It holds in a few lines of code and gets the job done.


Bye
 

Members online


Latest posts

Top