summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2024-02-19 19:50:29 -0500
committerJoshua Bakita <bakitajoshua@gmail.com>2024-02-19 20:31:11 -0500
commit18641058a2d60e172f18176b41d51baa706ffd85 (patch)
tree2d0a1a12c0dcb8a377eaaed4eb25ddf7fcf7372a /.gitignore
parenta1418db164af92d350234dfe6846884562c9e227 (diff)
Remove a potential cause of timing aberrations
It is possible to be preempted in the middle of reading `globalclock64`. When this causes mismatched readings of the high bits, we assumed the low bits were zero (as in the clock rollover case). In the preemption case, this resulted in a time reading that appears to be in the middle of another process's execution. Correct this by re-reading the low bits when the high bits do not match. (If a short preemption occurs and the high bits match, it does not matter the reading of the low bits occured before or after the preemption, as it will still be consistent with the high bits.) This bug likely affected `preemption_logger`, since that benchmark rapidly reads timestamps in a tight loop and is thus highly likely to be preempted mid-read.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions