Re:Is Your Linux Version Hiding Interrupt CPU Usage from You?
by tanelpoder on Monday February 15, 2021 @10:58AM
(#26143906)
I guess the fence instructions are there for avoiding the CPU out-of-order execution getting the timestamp too early (or late) compared to the interrupt service routine's start & end?
on newer x86_64 the accounting code is around 100-200 cycles, so not a big deal, interrupt return and exit code is more than that (save context, load new context etc.).
The RDTSC and fence timings (Latency, Reciprocal throughput) [0]:
[0] https://www.agner.org/optimize/instruction_tables.pdf