Page MenuHomeFreeBSD

linprocfs: Decode tsc_invariant CPU feature
ClosedPublic

Authored by dchagin on Jun 22 2022, 11:41 PM.
Tags
None
Referenced Files
F156931916: D35554.id107263.diff
Sun, May 17, 11:08 AM
F156928163: D35554.id.diff
Sun, May 17, 10:25 AM
F156843193: D35554.id107520.diff
Sat, May 16, 8:39 PM
F156818600: D35554.id107289.diff
Sat, May 16, 4:22 PM
Unknown Object (File)
Wed, May 13, 6:17 PM
Unknown Object (File)
Wed, May 13, 12:45 PM
Unknown Object (File)
Wed, May 13, 9:07 AM
Unknown Object (File)
Wed, May 13, 1:57 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

does Linux report it like this? I couldn't find "invariant_tsc" in the Linux repo

does Linux report it like this? I couldn't find "invariant_tsc" in the Linux repo

yep, it should be constant_tsc.
our tsc_is_invariant is the same Linux X86_FEATURE_CONSTANT_TSC (which is syntetic bit in the x86_cap_flags)
x86_cap_flags is generated by mkcapflags.sh abd used by procfs to generate CPU flags.

I think that check for invariant_tsc in the /proc/cpuinfo is a bug in glibc tests suite code.
Glibc call cpuid() in the get_extended_indices() and treats CPUID.80000007H:EDX[8] as INVARIANT_TSC and check that invariant_tsc exists in the /proc/cpuinfo, while it is not exposed by the Linux kernel.

This revision was not accepted when it landed; it landed in state Needs Review.Jun 29 2022, 7:39 AM
This revision was automatically updated to reflect the committed changes.