This patch enables more than one platform timer (PIT/RTC/HPET) programmed as periodic timer and adds them to abstract layer, which keeps track of pending_intr_nr to avoid time interrupt lost and sync''ed timer with TSC. It also makes some cleanup to the time related code. Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com> Signed-off-by: Yunhong Jiang yunhong.jiang@intel.com Thanks, Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Do RTC and HPET need to be included as periodic timers? They are never used by Linux for ticks (it always uses PIT for jiffy updates) and I think Windows is more robust against (or at least doesn''t noticeably complain about) time jumps. -- Keir On 6/12/06 5:15 am, "Yang, Xiaowei" <xiaowei.yang@intel.com> wrote:> This patch enables more than one platform timer (PIT/RTC/HPET) > programmed as periodic timer and adds them to abstract layer, which > keeps track of pending_intr_nr to avoid time interrupt lost and sync''ed > timer with TSC. > > It also makes some cleanup to the time related code. > > Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com> > Signed-off-by: Yunhong Jiang yunhong.jiang@intel.com > > Thanks, > Xiaowei > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>Do RTC and HPET need to be included as periodic timers? They are neverused>by Linux for ticks (it always uses PIT for jiffy updates) and I think >Windows is more robust against (or at least doesn''t noticeably complain >about) time jumps. >For RTC, yes! As we know some version of Windows uses RTC as main time resource for timekeeping. We noticed if it''s not added as periodic timer, Windows time may go slow in SMP environment. In case of HPET, the answer may be no, as OS can read the monotonically increased counter to see time jumps. And as periodic timer list is per vcpu, it''s also helpful to sync one vcpu''s lapic time with its TSC, which is needed when guest calibrates lapic at least. Thanks, Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> >Do RTC and HPET need to be included as periodic timers? They arenever> used > >by Linux for ticks (it always uses PIT for jiffy updates) and I think > >Windows is more robust against (or at least doesn''t noticeablycomplain> >about) time jumps. > > > > For RTC, yes! As we know some version of Windows uses RTC as main time > resource for timekeeping.I suspect that it only does this because during boot it decides that it doesn''t like the look of our pm_timer (I don''t blame it!) It would be good to invest some effort understanding why it selects RTC -- I''m sure that it''s a fall back. Ian We noticed if it''s not added as periodic> timer, Windows time may go slow in SMP environment. > In case of HPET, the answer may be no, as OS can read themonotonically> increased counter to see time jumps. > > And as periodic timer list is per vcpu, it''s also helpful to sync one > vcpu''s lapic time with its TSC, which is needed when guest calibrates > lapic at least. > > Thanks, > Xiaowei > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>> >Do RTC and HPET need to be included as periodic timers? They are >never >> used >> >by Linux for ticks (it always uses PIT for jiffy updates) and Ithink>> >Windows is more robust against (or at least doesn''t noticeably >complain >> >about) time jumps. >> > >> >> For RTC, yes! As we know some version of Windows uses RTC as maintime>> resource for timekeeping. > >I suspect that it only does this because during boot it decides that it >doesn''t like the look of our pm_timer (I don''t blame it!) > >It would be good to invest some effort understanding why it selects RTC >-- I''m sure that it''s a fall back. >I am not sure whether RTC is a fall back choice or not. The below paragraph is from a paper of timekeeping in VMware. From the text, it seems the answer is no. ------------ The timer device used and the number of interrupts generated per second vary depending on which specific version of Microsoft Windows, and which Windows HAL (hardware architecture layer), is installed. Most uniprocessor Windows installations use the PIT as their main system timer, but multiprocessor HALs and some ACPI uniprocessor HALs use the CMOS periodic timer instead. For systems using the PIT, the base interrupt rate is usually 100Hz, although Windows 98 uses 200Hz. For systems that use the CMOS timer, the base interrupt rate is usually 64Hz. ------------ Thanks, Xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel