ia64/linux-2.6.18-xen.hg

annotate Documentation/time_interpolators.txt @ 524:7f8b544237bf

netfront: Allow netfront in domain 0.

This is useful if your physical network device is in a utility domain.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 15 15:18:58 2008 +0100 (2008-04-15)
parents 831230e53067
children
rev   line source
ian@0 1 Time Interpolators
ian@0 2 ------------------
ian@0 3
ian@0 4 Time interpolators are a base of time calculation between timer ticks and
ian@0 5 allow an accurate determination of time down to the accuracy of the time
ian@0 6 source in nanoseconds.
ian@0 7
ian@0 8 The architecture specific code typically provides gettimeofday and
ian@0 9 settimeofday under Linux. The time interpolator provides both if an arch
ian@0 10 defines CONFIG_TIME_INTERPOLATION. The arch still must set up timer tick
ian@0 11 operations and call the necessary functions to advance the clock.
ian@0 12
ian@0 13 With the time interpolator a standardized interface exists for time
ian@0 14 interpolation between ticks. The provided logic is highly scalable
ian@0 15 and has been tested in SMP situations of up to 512 CPUs.
ian@0 16
ian@0 17 If CONFIG_TIME_INTERPOLATION is defined then the architecture specific code
ian@0 18 (or the device drivers - like HPET) may register time interpolators.
ian@0 19 These are typically defined in the following way:
ian@0 20
ian@0 21 static struct time_interpolator my_interpolator {
ian@0 22 .frequency = MY_FREQUENCY,
ian@0 23 .source = TIME_SOURCE_MMIO32,
ian@0 24 .shift = 8, /* scaling for higher accuracy */
ian@0 25 .drift = -1, /* Unknown drift */
ian@0 26 .jitter = 0 /* time source is stable */
ian@0 27 };
ian@0 28
ian@0 29 void time_init(void)
ian@0 30 {
ian@0 31 ....
ian@0 32 /* Initialization of the timer *.
ian@0 33 my_interpolator.address = &my_timer;
ian@0 34 register_time_interpolator(&my_interpolator);
ian@0 35 ....
ian@0 36 }
ian@0 37
ian@0 38 For more details see include/linux/timex.h and kernel/timer.c.
ian@0 39
ian@0 40 Christoph Lameter <christoph@lameter.com>, October 31, 2004
ian@0 41