Hello Is powerd finally considered stable and safe to use on 8.0? At least on 7.2, it consistently caused panics when used on Atom systems with Hyper-Threading enabled, but I recall that Attilio Rao was looking into it. - Sincerely, Dan Naumov
On Mon, Mar 08, 2010 at 12:47:37PM +0200, Dan Naumov wrote:> Is powerd finally considered stable and safe to use on 8.0? At least > on 7.2, it consistently caused panics when used on Atom systems with > Hyper-Threading enabled, but I recall that Attilio Rao was looking > into it.I didn't realise it was unsafe to use on RELENG_8 or RELENG_7...? I've been using powerd(8) without any problems on my Supermicro X7SBA system (CPU = Core2Duo E8400) for quite some time, including back to the RELENG_7 days. I should note that on RELENG_7, EIST/SpeedStep didn't appear to work properly (cpufreq(4) driver reporting that the est piece wouldn't attach), which historically (for me) has resulted in ACPI throttling being done (which works). Based on the sysctl output below, I believe acpi_perf is in use, but I'm not 100% certain. The man page doesn't really disclose how to determine which driver is in use. The X7SBA system in question is below. Be aware I limit the lowest clock frequency to 1500MHz using debug.cpufreq.lowest="1500" in /boot/loader.conf, which is why you don't see anything lower in freq_levels. $ uname -a FreeBSD icarus.home.lan 8.0-STABLE FreeBSD 8.0-STABLE #0: Mon Mar 1 11:51:38 PST 2010 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64 amd64 $ kenv | grep smbios.planar.product smbios.planar.product="X7SBA" $ uptime 3:00am up 6 days, 14:38, 1 user, load averages: 0.00, 0.00, 0.00 $ ps -auxwwww | grep powerd root 991 0.0 0.0 6836 1284 ?? Ss Mon12pm 2:42.21 /usr/sbin/powerd jdc 71353 0.0 0.0 9036 1524 0 S+ 3:00am 0:00.00 grep powerd $ sysctl dev.cpu dev.est dev.cpufreq dev.p4tcc debug.cpufreq kern.timecounter dev.cpu.0.%desc: ACPI CPU dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=\_PR_.CPU0 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%parent: acpi0 dev.cpu.0.temperature: 41.0C dev.cpu.0.freq: 1500 dev.cpu.0.freq_levels: 3000/35000 2667/28000 2333/22000 2041/19250 2000/16000 1750/14000 1500/12000 dev.cpu.0.cx_supported: C1/0 C2/85 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_.CPU1 dev.cpu.1.%pnpinfo: _HID=none _UID=0 dev.cpu.1.%parent: acpi0 dev.cpu.1.temperature: 41.0C dev.cpu.1.cx_supported: C1/0 C2/85 dev.cpu.1.cx_lowest: C1 dev.cpu.1.cx_usage: 100.00% 0.00% last 500us dev.est.0.%desc: Enhanced SpeedStep Frequency Control dev.est.0.%driver: est dev.est.0.%parent: cpu0 dev.est.0.freq_settings: 3000/35000 2667/28000 2333/22000 2000/16000 dev.est.1.%desc: Enhanced SpeedStep Frequency Control dev.est.1.%driver: est dev.est.1.%parent: cpu1 dev.est.1.freq_settings: 3000/35000 2667/28000 2333/22000 2000/16000 dev.cpufreq.0.%driver: cpufreq dev.cpufreq.0.%parent: cpu0 dev.cpufreq.1.%driver: cpufreq dev.cpufreq.1.%parent: cpu1 dev.p4tcc.0.%desc: CPU Frequency Thermal Control dev.p4tcc.0.%driver: p4tcc dev.p4tcc.0.%parent: cpu0 dev.p4tcc.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1 2500/-1 1250/-1 dev.p4tcc.1.%desc: CPU Frequency Thermal Control dev.p4tcc.1.%driver: p4tcc dev.p4tcc.1.%parent: cpu1 dev.p4tcc.1.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1 2500/-1 1250/-1 debug.cpufreq.verbose: 0 debug.cpufreq.lowest: 1500 kern.timecounter.tick: 1 kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy(-1000000) kern.timecounter.hardware: ACPI-fast kern.timecounter.stepwarnings: 0 kern.timecounter.tc.i8254.mask: 65535 kern.timecounter.tc.i8254.counter: 7127 kern.timecounter.tc.i8254.frequency: 1193182 kern.timecounter.tc.i8254.quality: 0 kern.timecounter.tc.ACPI-fast.mask: 16777215 kern.timecounter.tc.ACPI-fast.counter: 3275901 kern.timecounter.tc.ACPI-fast.frequency: 3579545 kern.timecounter.tc.ACPI-fast.quality: 1000 kern.timecounter.tc.TSC.mask: 4294967295 kern.timecounter.tc.TSC.counter: 1458979861 kern.timecounter.tc.TSC.frequency: 2992512852 kern.timecounter.tc.TSC.quality: -100 kern.timecounter.smp_tsc: 0 kern.timecounter.invariant_tsc: 1 -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
Okay, now I am baffled. Up until this point, I wasn't using powerd on this new Atom D510 system. I ran sysctl and noticed that dev.cpu.0.freq: is actually 1249 and doesn't change no matter what kind of load the system is under. If I boot to BIOS, under BIOS CPU is shown as 1,66 Ghz. Okayy... I guess this explains why my buildworld and buildkernel took over 5 hours if by default, it gets stuck at 1249 Mhz for no obvious reason. I enabled powerd and now according to dev.cpu.0.freq:, the system is permanently stuck at 1666 Mhz, regardless of whether the system is under load or not. atombsd# uname -a FreeBSD atombsd.localdomain 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 21:11:58 UTC 2010 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 atombsd# kenv | grep smbios.planar.product smbios.planar.product="X7SPA-H" atombsd# sysctl dev.cpu dev.est dev.cpufreq dev.p4tcc debug.cpufreq kern.timecounter dev.cpu.0.%desc: ACPI CPU dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=\_PR_.P001 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%parent: acpi0 dev.cpu.0.freq: 1666 dev.cpu.0.freq_levels: 1666/-1 1457/-1 1249/-1 1041/-1 833/-1 624/-1 416/-1 208/-1 dev.cpu.0.cx_supported: C1/0 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% last 500us dev.cpu.1.%desc: ACPI CPU dev.cpu.1.%driver: cpu dev.cpu.1.%location: handle=\_PR_.P002 dev.cpu.1.%pnpinfo: _HID=none _UID=0 dev.cpu.1.%parent: acpi0 dev.cpu.1.cx_supported: C1/0 dev.cpu.1.cx_lowest: C1 dev.cpu.1.cx_usage: 100.00% last 500us dev.cpu.2.%desc: ACPI CPU dev.cpu.2.%driver: cpu dev.cpu.2.%location: handle=\_PR_.P003 dev.cpu.2.%pnpinfo: _HID=none _UID=0 dev.cpu.2.%parent: acpi0 dev.cpu.2.cx_supported: C1/0 dev.cpu.2.cx_lowest: C1 dev.cpu.2.cx_usage: 100.00% last 500us dev.cpu.3.%desc: ACPI CPU dev.cpu.3.%driver: cpu dev.cpu.3.%location: handle=\_PR_.P004 dev.cpu.3.%pnpinfo: _HID=none _UID=0 dev.cpu.3.%parent: acpi0 dev.cpu.3.cx_supported: C1/0 dev.cpu.3.cx_lowest: C1 dev.cpu.3.cx_usage: 100.00% last 500us sysctl: unknown oid 'dev.est' Right. So how do I investigate why does the CPU get stuck at 1249 Mhz after boot by default when not using powerd and why it gets stuck at 1666 Mhz with powerd enabled and doesn't scale back down when IDLE? Out of curiosity, I stopped powerd but the CPU remained at 1666 Mhz. - Sincerely, Dan Naumov
>Up until this point, I wasn't using powerd on this new Atom D510 >system. I ran sysctl and noticed that dev.cpu.0.freq: is actually 1249 >and doesn't change no matter what kind of load the system is under. If >I boot to BIOS, under BIOS CPU is shown as 1,66 Ghz. Okayy... I guess >this explains why my buildworld and buildkernel took over 5 hours if >by default, it gets stuck at 1249 Mhz for no obvious reason. I enabled >powerd and now according to dev.cpu.0.freq:, the system is permanently >stuck at 1666 Mhz, regardless of whether the system is under load or >not.OK, a reboot somehow fixed the powerd issue: 1) Disabled powerd 2) Rebooted 3) Upon bootup, checked dev.cpu.0.freq - it's stuck at 1249 (should be 1666 by default) 4) Enabled and started powerd - CPU scales correctly according to load There is some bug somewhere though, because something puts my CPU to 1249 Mhz upon boot with powerd disabled and it gets stuck there, this shouldn't happen. - Sincerely, Dan Naumov
Jeremy Chadwick wrote:> I should note that on RELENG_7, EIST/SpeedStep didn't appear to work > properly (cpufreq(4) driver reporting that the est piece wouldn't > attach), which historically (for me) has resulted in ACPI throttling > being done (which works). Based on the sysctl output below, I believe > acpi_perf is in use, but I'm not 100% certain. The man page doesn't > really disclose how to determine which driver is in use. > > The X7SBA system in question is below. Be aware I limit the lowest > clock frequency to 1500MHz using debug.cpufreq.lowest="1500" in > /boot/loader.conf, which is why you don't see anything lower in > freq_levels. > > dev.est.0.freq_settings: 3000/35000 2667/28000 2333/22000 2000/16000This is the real set of EIST supported levels.> dev.cpu.0.freq_levels: 3000/35000 2667/28000 2333/22000 2041/192502000/16000 1750/14000 1500/12000 All the rest of these are throttling. I would recommend you to disable it by setting: hint.p4tcc.0.disabled=1 hint.acpi_throttle.0.disabled=1 -- Alexander Motin