Skip to content

Commit

Permalink
Force sync tsc rather than tsc_adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
Seey6 authored Oct 21, 2023
1 parent 15df7f0 commit 72acc56
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CpuTscSync/CpuTscSync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ void CpuTscSyncPlugin::reset_tsc_adjust(void *)

void CpuTscSyncPlugin::tsc_adjust_or_reset()
{
if (getKernelVersion() >= KernelVersion::Monterey) {
DBGLOG("cputs", "reset tsc adjust");
mp_rendezvous_no_intrs(reset_tsc_adjust, NULL);
} else {
// if (getKernelVersion() >= KernelVersion::Monterey) {
// DBGLOG("cputs", "reset tsc adjust");
// mp_rendezvous_no_intrs(reset_tsc_adjust, NULL);
// } else {
uint64_t tsc = rdtsc64();
DBGLOG("cputs", "current tsc from rdtsc64() is %lld. Rendezvouing..", tsc);
// call the kernel function that will call this "action" on all cores/processors
mp_rendezvous_no_intrs(stamp_tsc, &tsc);
}
// }
tsc_synced = true;
}

Expand Down

0 comments on commit 72acc56

Please sign in to comment.