[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] clocksource xen documentation?



On Wed, 2015-08-05 at 22:33 +0000, Patrick Schleizer wrote:
> Hi!
> 
> cat /sys/devices/system/clocksource/clocksource0/current_clocksource
> 
> xen
> 
> What does clocksource xen do? Using search engines I found lots of
> discussions on how to disable it, bugs and whatnot. But failed to find
> documentation on what it actually does.

"clocksource" is a Linux term, elsewhere it is called the Xen "pvclock",
which might have gotten some more google juice.

The interface is defined at:
http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,xen.h.
html#Struct_vcpu_time_info
which also has some descriptions of how it works.

It's essentially a mechanism which allows the guest to use direct access to
the native clock plus scaling and offset factors exposed from the
hypervisor via shared memory to come up with a PV timesource which can be
read without needing to trap to the hypervisor.

In Linux it is implemented in arch/x86/kernel/pvclock.c and is shared by a
variety of hypervisors (although the original concept came from Xen).

I'm talking about the "tick" type of time source here, there is also a pv
wallclock (i.e. date and time) interface, but I don't think that's what
Linux's clocksource is about. Hopefully I've not confused the two (I often
do). FWIW the wallclock interface is at http://xenbits.xen.org/docs/unstabl
e/hypercall/x86_64/include,public,xen.h.html#Struct_shared_info

Ian.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.