Fix DTrace TSC skew calculation:
The skew calculation here is exactly backwards. We were able to repro it on a multi-package ESX server running a FreeBSD VM, where the TSCs can be pretty evil. MFC after: 1 week Submitted by: Jeff Ford <jeffrey.ford2@isilon.com> Reviewed by: avg, gnn
This commit is contained in:
parent
932c975298
commit
db5c7d363d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236566
@ -446,7 +446,7 @@ dtrace_gethrtime()
|
||||
* (see nsec_scale calculations) taking into account 32-bit shift of
|
||||
* the higher half and finally add.
|
||||
*/
|
||||
tsc = rdtsc() + tsc_skew[curcpu];
|
||||
tsc = rdtsc() - tsc_skew[curcpu];
|
||||
lo = tsc;
|
||||
hi = tsc >> 32;
|
||||
return (((lo * nsec_scale) >> SCALE_SHIFT) +
|
||||
|
@ -447,7 +447,7 @@ dtrace_gethrtime()
|
||||
* (see nsec_scale calculations) taking into account 32-bit shift of
|
||||
* the higher half and finally add.
|
||||
*/
|
||||
tsc = rdtsc() + tsc_skew[curcpu];
|
||||
tsc = rdtsc() - tsc_skew[curcpu];
|
||||
lo = tsc;
|
||||
hi = tsc >> 32;
|
||||
return (((lo * nsec_scale) >> SCALE_SHIFT) +
|
||||
|
Loading…
Reference in New Issue
Block a user