Bug 271548 - Alder lake CPU not running at full speed
Summary: Alder lake CPU not running at full speed
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.2-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-21 06:46 UTC by bolvan
Modified: 2024-04-08 18:53 UTC (History)
3 users (show)

See Also:


Attachments
hardware info (42.45 KB, text/plain)
2024-03-22 18:22 UTC, mike
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bolvan 2023-05-21 06:46:36 UTC
Looks like FreeBSD 13.2 does not correctly manages core MHz on alder lake CPUs and does not support turbo boost.
I have core i7 12700K.
Noticed that openssl speed -evp aes-128-cbc performs 30% slower than on linux and windows.

# sysctl dev.cpu.0.freq
dev.cpu.0.freq: 498
# sysctl dev.cpu.0.freq_levels
dev.cpu.0.freq_levels: 3609/-1
# sysctl dev.cpu.0.freq=3609
dev.cpu.0.freq: 498 -> 2905

Strange results from freq_levels. It cant even set 3.6 Ghz (normal freq without turbo boost)
Comment 1 bolvan 2023-05-21 10:44:20 UTC
Disabling E-cores causes cpu freq to raise to 4.7 GHz
So, it looks like freebsd cannot handle mixed-core architecture properly and choses minimum of max frequence of all cores
In my case its 2.9 GHz
Comment 2 mike 2024-03-22 18:15:36 UTC
Looks like I have the same problem on RELENG_14 on an N100 CPU.  It seems to post the E core info in dmesg

CPU: Intel(R) N100 (806.40-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0xb06e0  Family=0x6  Model=0xbe  Stepping=0
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x121<LAHF,ABM,Prefetch>
  Structured Extended Features=0x239ca7eb<FSGSBASE,TSCADJ,BMI1,AVX2,FDPEXC,SMEP,BMI2,ERMS,INVPCID,NFPUSG,PQE,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PROCTRACE,SHA>
  Structured Extended Features2=0x98c007bc<UMIP,PKU,OSPKE,WAITPKG,GFNI,VAES,VPCLMULQDQ,RDPID,MOVDIRI,MOVDIR64B>
  Structured Extended Features3=0xfc184410<FSRM,MD_CLEAR,IBT,IBPB,STIBP,L1DFL,ARCH_CAP,CORE_CAP,SSBD>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  IA32_ARCH_CAPS=0x1580fd6b<RDCL_NO,IBRS_ALL,SKIP_L1DFL_VME,MDS_NO,TAA_NO>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr
  TSC: P-state invariant, performance statistics
real memory  = 8589934592 (8192 MB)
avail memory = 7994687488 (7624 MB)
Comment 3 mike 2024-03-22 18:22:06 UTC
Created attachment 249415 [details]
hardware info

dmesg pciconf etc attached in txt file