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

[Xen-devel] Re: pvclock implementation in pv_ops kernel: why not __native_read_tsc()?



On 10/30/09 16:30, Dan Magenheimer wrote:
> I was looking at rdtsc usages in 2.6.31... you may
> or may not be surprised to hear that there is exactly
> one usage location, at least through boot and some
> basic NFS copying: native_read_tsc().  Digging through
> the pvclock code, I see that pvclock calls native_read_tsc()
> rather than use the __native_read_tsc() inline function.
>   

I already changed it to __native_read_tsc() in xen.git, mostly because
the vsyscall code can't call kernel functions.  But I'm not sure what
the distinction is supposed to be.

> Any reason for this?  It seems an unnecessary extra
> function call for a routine that is used thousands
> of times every second.
>   

I suppose, but the function call is trivial compared to the cost of the
rdtsc itself, or even the lfence barriers surrounding it.

    J

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


 


Rackspace

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