HomeFreeBSD

libc: Fall back to rdtsc when using pvclock and rdtscp is not available

Description

libc: Fall back to rdtsc when using pvclock and rdtscp is not available

In preparation for a follow-up revision wherein kvmclock may export
timekeeping info to userspace even in the absence of AMDID_RDTSCP, fall
back to using rdtsc when rdtscp isn't available. This mimics
pvclock_read_time_info() in the kernel.

Reviewed by: kib
Tested by: Shrikanth R Kamath <kshrikanth@juniper.net>
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38341

Details

Provenance
markjAuthored on Feb 3 2023, 3:53 PM
Reviewer
kib
Differential Revision
D38341: libc: Fall back to rdtsc when using pvclock and rdtscp is not available
Parents
rGeb08932156dc: linux(4): Microoptimize linux_ipc code to unindent else blocks.
Branches
Unknown
Tags
Unknown