This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Commit ea34a48
committed
Serialize rdtsc instruction on x86_64
Unfortunately rdtsc can produce skewed results without mfence sometimes.
This is what GNU/Linux does in rdtsc_ordered function.
ref: https://github.com/torvalds/linux/blob/03b9730b769fc4d87e40f6104f4c5b2e43889f19/arch/x86/include/asm/msr.h#L130-L1541 parent 932d1c0 commit ea34a48
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
865 | 869 | | |
866 | 870 | | |
867 | 871 | | |
| |||
0 commit comments