Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Feb 2013 13:04:39 -0500
From:      Mark Saad <nonesuch@longcount.org>
To:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Question on timecounter hardware / What cpu flag is constant_tsc
Message-ID:  <CAMXt9NYa6HT_Ee5q5jHepBWd5R7NCJRUzbbHU%2Brj%2BxfDnqO2Sw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
All
 I am looking into an issue with timecounter hardware on a number of HP
DL165 G7's

They all run FreeBSD 9.1-RELEASE and all have the same CPU and firmware.
However they report strange results when you probe  kern.timecounter.choice
and
kern.timecounter.hardware

Take this example

 ssh root@ssr4 "sysctl kern.timecounter.choice"
kern.timecounter.choice: TSC-low(-100) ACPI-safe(850) HPET(950) i8254(0)
dummy(-1000000)

ssh root@ssr4 "sysctl kern.timecounter.hardware"
kern.timecounter.hardware: HPET

dmidecode -s processor-version
AMD Opteron(TM) Processor 6212

dmidecode -s processor-frequency
2600 MHz
Unknown

from dmesg.boot
CPU: AMD Opteron(TM) Processor 6212                  (2600.06-MHz K8-class
CPU)
  Origin = "AuthenticAMD"  Id = 0x600f12  Family = 15  Model = 1  Stepping
= 2

Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>

Features2=0x1e98220b<SSE3,PCLMULQDQ,MON,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD
Features2=0x1c9bfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,NodeId,Topology,<b23>,<b2
4>>

vs

ssh root@ssr3 "sysctl kern.timecounter.choice"
kern.timecounter.choice: TSC-low(1000) ACPI-safe(850) HPET(950) i8254(0)
dummy(-1000000)

 ssh root@ssr3 "sysctl kern.timecounter.hardware"
kern.timecounter.hardware: TSC-low

dmidecode -s processor-version
AMD Opteron(TM) Processor 6212

dmidecode -s processor-frequency
2600 MHz
Unknown

from dmesg.boot
CPU: AMD Opteron(TM) Processor 6212                  (2600.06-MHz K8-class
CPU)
  Origin = "AuthenticAMD"  Id = 0x600f12  Family = 15  Model = 1  Stepping
= 2

Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>

Features2=0x1e98220b<SSE3,PCLMULQDQ,MON,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD
Features2=0x1c9bfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,NodeId,Topology,<b23>,<b2
4>>


So my questions, what is the preferred time counter here ? In linux using
TSC is preferred over hpet and to tell if you have a trusted TSC your cpu
needs to support feature constant_tsc . Does anyone know what cpu feature
this is; is it listed in my a fore mentioned dmesg.boot feature lists ?

TIA


-- 
mark saad | nonesuch@longcount.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMXt9NYa6HT_Ee5q5jHepBWd5R7NCJRUzbbHU%2Brj%2BxfDnqO2Sw>