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

(cherry picked from commit 26d105199ec89d6eaec8a9ca70e3b05ca65e3aac)

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
rG74631b842197: shm: Document shm_create_largepage()
Branches
Unknown
Tags
Unknown