# Enhanced speedstep on Xeon X5470?



## Terry_Kennedy (Apr 20, 2010)

I'm setting up a new FreeBSD box (Dell PowerEdge R300, Xeon X5470 CPU) w/ 8-STABLE amd64 (cvsup'd as of today - 19-Apr-2010) and I'm getting a boot message for each core saying "CPU supports Enhanced Speedstep, but is not recognized". I did a search for this message and only found old references (to 7.2) and cases where the virtual cores of a HT CPU were giving this error.

Intel shows the X5470 launched in Q3 2008, so I would have thought that the 8-STABLE est driver would have either recognized it or ignored it (if it couldn't do anything useful with it).

The relevant parts of the dmesg are:


```
CPU: Intel(R) Xeon(R) CPU           X5470  @ 3.33GHz (3333.35-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x1067a  Family = 6  Model = 17  Stepping = 10
  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=0x40ce3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,XSAVE>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant
real memory  = 8589934592 (8192 MB)
avail memory = 8256794624 (7874 MB)
ACPI APIC Table: <DELL   PE_SC3  >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3
[...]
est0: <Enhanced SpeedStep Frequency Control> on cpu0
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr a220a2206000a22
device_attach: est0 attach returned 6
p4tcc0: <CPU Frequency Thermal Control> on cpu0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr a220a2206000a22
device_attach: est1 attach returned 6
p4tcc1: <CPU Frequency Thermal Control> on cpu1
est2: <Enhanced SpeedStep Frequency Control> on cpu2
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr a220a2206000a22
device_attach: est2 attach returned 6
p4tcc2: <CPU Frequency Thermal Control> on cpu2
est3: <Enhanced SpeedStep Frequency Control> on cpu3
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr a220a2206000a22
device_attach: est3 attach returned 6
p4tcc3: <CPU Frequency Thermal Control> on cpu3
Timecounters tick every 1.000 msec
```

I'm attaching the whole dmesg in case it is neeeded. Let me know if more information is needed.


----------



## vermaden (Apr 20, 2010)

Enable *powerd(8)* and see if it works:


```
# echo powerd_enable=\"YES\" >> /etc/rc.conf
# /etc/rc.d/powerd start
# sysctl dev.cpu.0.freq
```


----------



## mav@ (Apr 20, 2010)

It looks like your BIOS ACPI code does not provide set of frequency levels supported by CPU. You should try to either change some BIOS options or update BIOS.


----------



## Terry_Kennedy (Apr 20, 2010)

mav@ said:
			
		

> It looks like your BIOS ACPI code does not provide set of frequency levels supported by CPU. You should try to either change some BIOS options or update BIOS.


I should have mentioned in my original post that I'm running the latest BIOS / firmware / etc. on this system. The BIOS is 1.4.3 from 09/30/2009.

Looking at the output of "sysctl dev.cpu", I see:


```
test4# sysctl dev.cpu
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU1
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: 3333
dev.cpu.0.freq_levels: 3333/-1 2916/-1 2499/-1 2083/-1 1666/-1 1249/-1 833/-1 416/-1
dev.cpu.0.cx_supported: C1/0 C2/60
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00% 0.00% last 500us
dev.cpu.1.%desc: ACPI CPU
dev.cpu.1.%driver: cpu
dev.cpu.1.%location: handle=\_PR_.CPU2
dev.cpu.1.%pnpinfo: _HID=none _UID=0
dev.cpu.1.%parent: acpi0
dev.cpu.1.cx_supported: C1/0 C2/60
dev.cpu.1.cx_lowest: C1
dev.cpu.1.cx_usage: 100.00% 0.00% last 500us
dev.cpu.2.%desc: ACPI CPU
dev.cpu.2.%driver: cpu
dev.cpu.2.%location: handle=\_PR_.CPU3
dev.cpu.2.%pnpinfo: _HID=none _UID=0
dev.cpu.2.%parent: acpi0
dev.cpu.2.cx_supported: C1/0 C2/60
dev.cpu.2.cx_lowest: C1
dev.cpu.2.cx_usage: 100.00% 0.00% last 500us
dev.cpu.3.%desc: ACPI CPU
dev.cpu.3.%driver: cpu
dev.cpu.3.%location: handle=\_PR_.CPU4
dev.cpu.3.%pnpinfo: _HID=none _UID=0
dev.cpu.3.%parent: acpi0
dev.cpu.3.cx_supported: C1/0 C2/60
dev.cpu.3.cx_lowest: C1
dev.cpu.3.cx_usage: 100.00% 0.00% last 500us
```

That seems like a reasonable list of CPU frequencies is provided, though this (obviously  isn't my area of expertise...


----------



## DutchDaemon (Apr 20, 2010)

Is this relevant in any way?

http://ark.intel.com/Product.aspx?id=35430 -> Enhanced IntelÂ® Speedstep Technology	*No*


----------



## Zare (Apr 20, 2010)

OP asked about "enhanced speedstep", not "Enhanced(R) Speedstep Technology".


----------



## DutchDaemon (Apr 20, 2010)

The -1 values in your CPU frequencies don't look too good. Something like this should be expected:


```
dev.cpu.0.freq_levels: 2201/35000 1925/30625 1650/26250 1600/23000 1400/20125 1200/16000 1050/14000 900/12000 800/14000 700/12250 600/10500 
500/8750 400/7000 300/5250 200/3500 100/1750
```


```
dev.cpu.0.freq_levels: 3000/89000 2800/71000 2450/62125 2100/53250 1750/44375 1400/35500 1050/26625 700/17750 350/8875
```


----------



## vermaden (Apr 20, 2010)

DutchDaemon said:
			
		

> The -1 values in your CPU frequencies don't look too good.


Its propably because when Speedstep is enabled, lower frequencies use less power (smaller numbers beside smaller frequency), as his CPU does not have Speedstep, he may lower down the frequency, but he will not gain any power savings at all, that is why there are -1 all the time.


----------



## Terry_Kennedy (Apr 20, 2010)

DutchDaemon said:
			
		

> Is this relevant in any way?
> 
> http://ark.intel.com/Product.aspx?id=35430 -> Enhanced IntelÂ® Speedstep Technology	*No*


If that's the case, then the detection code in the est driver is busted, since it says:


```
est: CPU supports Enhanced Speedstep, but is not recognized.
```


----------



## mav@ (Apr 20, 2010)

Values with -1 is the result of only using throttling (P-states). On modern CPUs with C1E support it gives almost nothing. Power consumption levels for EIST should be provided by APCI together with array of supported frequencies, but for some reason not in this case.

Same time I see your ACPI reports C-states support. You may try to use it for CPU power management. Look here how to enable it: http://wiki.freebsd.org/TuningPowerConsumption


----------



## Terry_Kennedy (Apr 20, 2010)

mav@ said:
			
		

> Values with -1 is the result of only using throttling (P-states). On modern CPUs with C1E support it gives almost nothing. Power consumption levels for EIST should be provided by APCI together with array of supported frequencies, but for some reason not in this case



It turns out to have been the BIOS setting "Demand-based Power Management". The description for that reads "When enabled the CPU Performancd State tables will be reported to the Operating System".

When this is done, both the dmesg and dev.cpu sysctl output seem more reasonable:


```
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
est2: <Enhanced SpeedStep Frequency Control> on cpu2
p4tcc2: <CPU Frequency Thermal Control> on cpu2
est3: <Enhanced SpeedStep Frequency Control> on cpu3
p4tcc3: <CPU Frequency Thermal Control> on cpu3
```


```
test4# sysctl dev.cpu
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU1
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: 3333
dev.cpu.0.freq_levels: 3333/103000 3000/91000 2667/81000 2333/72000 2041/63000 2000/63000 1750/55125 1500/47250 1250/39375 1000/31500 750/23625 500/15750 250/7875
dev.cpu.0.cx_supported: C1/20 C2/40 C3/60
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 500us
dev.cpu.1.%desc: ACPI CPU
dev.cpu.1.%driver: cpu
dev.cpu.1.%location: handle=\_PR_.CPU2
dev.cpu.1.%pnpinfo: _HID=none _UID=0
dev.cpu.1.%parent: acpi0
dev.cpu.1.cx_supported: C1/20 C2/40 C3/60
dev.cpu.1.cx_lowest: C1
dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 500us
dev.cpu.2.%desc: ACPI CPU
dev.cpu.2.%driver: cpu
dev.cpu.2.%location: handle=\_PR_.CPU3
dev.cpu.2.%pnpinfo: _HID=none _UID=0
dev.cpu.2.%parent: acpi0
dev.cpu.2.cx_supported: C1/20 C2/40 C3/60
dev.cpu.2.cx_lowest: C1
dev.cpu.2.cx_usage: 100.00% 0.00% 0.00% last 500us
dev.cpu.3.%desc: ACPI CPU
dev.cpu.3.%driver: cpu
dev.cpu.3.%location: handle=\_PR_.CPU4
dev.cpu.3.%pnpinfo: _HID=none _UID=0
dev.cpu.3.%parent: acpi0
dev.cpu.3.cx_supported: C1/20 C2/40 C3/60
dev.cpu.3.cx_lowest: C1
dev.cpu.3.cx_usage: 100.00% 0.00% 0.00% last 500us
```

Also, for the benefit of other people who may find this thread, the whole est business can be disabled by putting:

[cmd=]hint.est.0.disabled="1"[/cmd]

in /boot/loader.conf


----------



## mav@ (Apr 20, 2010)

I don't see any reason to disable est. Instead I would recommend to disable throttling control with:

```
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1
```


----------

