[lkml]   [2006]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Xen-devel] Re: [RFC PATCH 25/35] Add Xen time abstractions
Chris Wright wrote:
> * Arjan van de Ven ( 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:

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

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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-03-22 23:29    [W:0.117 / U:6.592 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site