|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?)
> > Just like what is being used to allow apps to get the CPU
> number on native
> > kernels (or the vCPU one on Xen-ified ones): Have a GDT
> entry the limit of
> > which is the number you want, and have the app use the lsl
> instruction to
> > get at it.
>
> Yes, that's true. Xen could provide such a segment descriptor
> in its private
> area of the GDT. The issue then would be that, in a compound pvclock
> operation spanning multiple machine instructions, the pCPU
> number revealed
> by the LSL instruction can be stale by the time it is used
> later in the
> compound operation.
The algorithm could check the pCPU number before and after
reading the pvclock data and doing the rdtsc, and if they
don't match, start again. (Doesn't the pvclock algorithm
already do that with some versioning number in the pvclock
data itself to ensure that the rest of the data didn't
change while it was being read?)
I'm clueless about GDTs and the LSL instrution so would
need some help prototyping this.
Dan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] Re: rdtsc: correctness vs performance on Xen (and KVM?), (continued)
- [Xen-devel] Re: rdtsc: correctness vs performance on Xen (and KVM?), Keir Fraser
- [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Dan Magenheimer
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Keir Fraser
- RE: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?),
Dan Magenheimer <=
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Jeremy Fitzhardinge
- RE: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Dan Magenheimer
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Jeremy Fitzhardinge
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Keir Fraser
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Jeremy Fitzhardinge
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Keir Fraser
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Jeremy Fitzhardinge
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Jan Beulich
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Jeremy Fitzhardinge
- Re: [Xen-devel] RE: rdtsc: correctness vs performance on Xen (and KVM?), Jan Beulich
|
|
|
|
|