HomeFreeBSD

pvclock: Export a vDSO page even without rdtscp available

Description

pvclock: Export a vDSO page even without rdtscp available

When the cycle counter is "stable", i.e., synchronized across vCPUs by
the hypervisor, userspace can use a serialized rdtsc instead of relying
on rdtscp, just like the kernel timecounter does. This can be useful
for performance in guests where the hypervisor hides rdtscp for some
reason.

To avoid breaking compatibility with older userspace which expects
rdtscp to be usable when pvclock exports timekeeping info, hide this
feature behind a sysctl.

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/D38342

Details

Provenance
markjAuthored on Feb 3 2023, 3:54 PM
Reviewer
kib
Differential Revision
D38342: pvclock: Export a vDSO page even without rdtscp available
Parents
rG26d105199ec8: libc: Fall back to rdtsc when using pvclock and rdtscp is not available
Branches
Unknown
Tags
Unknown