WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [RFC PATCH 25/35] Add Xen time abstractions

Chris Wright wrote:
* Arjan van de Ven (arjan@xxxxxxxxxxxxx) wrote:
Duplication like this is evil because it means too many places need
duplicated bugfixes and rework (and such rework is underway)

Yes, that one is already on the todo list.  Will work on consolidation
there.

thanks,
-chris


These patches from the VMI patch series sent out last week could be easily used to abstract time when running on Xen to accomplish the consolidation and transparency with native goals:

http://lkml.org/lkml/2006/3/13/172
http://lkml.org/lkml/2006/3/13/173

Unlike this Xen specific patch, the VMI time patches already provide transparency with native -- the timer_vmi.c device is used when booting on a hypervisor that provides this functionality, otherwise one of the traditional time sources is fallen back to.

Also, they remove much of the code duplication by taking advantage of the the i386 time interface mechanisms (and can be easily updated for the time rework that is underway).

Finally, the vmi nicely abstracts the details of the formula that is used to compute system_time from the HYPERVISOR_shared_info time parameters by hiding the computation underneath the kernel <-> hypervisor interface. Note that efficiency is not lost since the code to compute system_time, etc would execute in the "ROM" (a.k.a. hypercall page) without needing to call all the way down into the hypervisor. Hiding these details from the Linux code would be nice since it leads to easier to understand linux code (it doesn't have to deal with the details of how time is interpolated from hardware rdtsc), and allows the calculation for "system_time", etc to change without breaking the kernel<->hypervisor interface. It also allows for more freedom as to how the time interface is implemented; hypervisors aren't forced to implement system_time using a particular algorithm. The Xen interface needlessly imposes one particular algorithm to compute system_time from rdtsc.

See this post for a description of how the Xen time interface could be mapped to the timer_vmi.c patches I linked above:

http://lists.xensource.com/archives/html/xen-devel/2006-02/msg00876.html

Dan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>