From owner-freebsd-hackers@freebsd.org Wed Aug 5 12:59:29 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C21F29B42D7 for ; Wed, 5 Aug 2015 12:59:29 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com [IPv6:2607:f8b0:400d:c04::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76F68B83 for ; Wed, 5 Aug 2015 12:59:29 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: by qgeh16 with SMTP id h16so28574946qge.3 for ; Wed, 05 Aug 2015 05:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-type:content-transfer-encoding; bh=oMxI2guj1qVZZP6GdtQof2eolV2nBau07YI7iUQWl5c=; b=CxVp7+r03bILCQxh4WcBOlyVeTdZf8+0Y8ABWLqps0t0FhU+FDCVndP2CBnHhpZ6jL ba0Q6xBSqkhbIFQJg6Lhvp5A6tRYo5SbX4Nd8zD4Rk9mUReNsok+Z0vP7w10nCMsE6SD rj0CjyBlN3T07b0PQL4WP+1VYhjJLOTvjYNJ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-type :content-transfer-encoding; bh=oMxI2guj1qVZZP6GdtQof2eolV2nBau07YI7iUQWl5c=; b=JRQbA3VOxbfAL3PUMKkDKYLvm/6bjuf7wraGNPK8STc9jeT34V4O4SJvf0f4aMnyqJ tUdDwFDk8hcZOVcKVrxEEs4oHQWIntbP9YyLb9WcJCSpawisGuS6YvbH7oA62fSfob4F yGGRH7+c8VpNH0iy4oX+mut/rssJOfa7SmoQAA5Ue+RrrAqoCyFUBi5VVNIfYer7RQEK oXQ0BST8AqPdcXH9ySo/Lm4usVSyM0zdRFVCkHt+NAh0zj3VIlAaa2yVegkYZWkEyerN v32TCHUFA3Vu8YY3anhk97MZivn8/LKRKY4yJtcaiEg4MgrsyGIXzKTZ6HE8Pfx9ufDC D94Q== X-Gm-Message-State: ALoCoQlyB4W7JQc5vPuDQxrs9w8oULSqE9pxzEk54aw6FpllrRuzPpknJoN97vwxWblR7bKg2ry5 X-Received: by 10.141.28.6 with SMTP id f6mr17774978qhe.64.1438779568520; Wed, 05 Aug 2015 05:59:28 -0700 (PDT) Received: from Papi ([177.98.27.21]) by smtp.gmail.com with ESMTPSA id l11sm1319673qga.43.2015.08.05.05.59.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 05:59:28 -0700 (PDT) Date: Wed, 5 Aug 2015 10:04:01 -0300 From: Mario Lobo To: John Baldwin Cc: freebsd-hackers@freebsd.org, "Herbert J. Skuhra" Subject: Re: Gigabyte 970A-UD3P and hwpstate problem Message-ID: <20150805100401.265ca50f@Papi> In-Reply-To: <1678045.UlXctAKXAD@ralph.baldwin.cx> References: <20150710213752.473cb831@Papi> <20150711135006.GB41680@oslo.ath.cx> <20150712152321.51b8407c@Papi> <1678045.UlXctAKXAD@ralph.baldwin.cx> Organization: BSD X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2015 12:59:29 -0000 On Tue, 04 Aug 2015 13:18:21 -0700 John Baldwin wrote: > On Sunday, July 12, 2015 03:23:21 PM Mario Lobo wrote: > > On Sat, 11 Jul 2015 15:50:06 +0200 > > "Herbert J. Skuhra" wrote: > >=20 > > > On Fri, Jul 10, 2015 at 09:37:52PM -0300, Mario Lobo wrote: > > > > Hi; > > > >=20 > > > > I just installed a Gigabyte 970A-UD3P mobo and updated BIOS to > > > > the latest version but the problem also showed with the previous > > > > version. > > > >=20 > > > > Here is my amd64 10-STABLE setup: > > > >=20 > > > > FreeBSD 10.2-PRERELEASE #0 r285207M: Tue Jul 7 00:11:01 BRT > > > > 2015 amd64 > > > >=20 > > > > CPU: AMD FX-8320E Eight-Core Processor (3214.93-MHz K8-class > > > > CPU) Origin=3D"AuthenticAMD" Id=3D0x600f20 Family=3D0x15 Model= =3D0x2 > > > > Stepping=3D0 > > > > Features=3D0x178bfbff > > > > Features2=3D0x3e98320b > > > > AMD > > > > Features=3D0x2e500800 > > > > AMD > > > > Features2=3D0x1ebbfff > > > > Structured Extended Features=3D0x8 SVM: > > > > NP,NRIP,VClean,AFlush,DAssist,NAsids=3D65536 TSC: P-state > > > > invariant, performance statistics real memory =3D 17179869184 > > > > (16384 MB) [snip] ACPI BIOS Warning (bug): Optional FADT field > > > > Pm2ControlBlock has zero address or length: > > > > 0x0000000000000000/0x1 (20150515/tbfadt-673) [snip] > > > > hpet0: iomem 0xfed00000-0xfed003ff > > > > on acpi0 > > > >=20 > > > > The problem: > > > >=20 > > > > powerd: no cpufreq(4) support -- aborting: No such file or > > > > directory /etc/rc: WARNING: failed to start powerd > > >=20 > > > Could this be your problem: > > >=20 > > > r276986 | nwhitehorn | 2015-01-11 18:10:07 +0100 (s=F8n, 11 jan > > > 2015) | 8 lines > > >=20 > > > MFC r265329: > > > Disable ACPI and P4TCC throttling by default, following > > > discussion on freebsd-current. These CPU speed control techniques > > > are usually unhelpful at best. For now, continue building the > > > relevant code into GENERIC so that it can trivially be re-enabled > > > at runtime if anyone wants it. > > >=20 > > > Relnotes: yes > > >=20 > > > % svnlite diff -c 276986 sys/amd64/conf/GENERIC.hints=20 > > > Index: sys/amd64/conf/GENERIC.hints > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > --- sys/amd64/conf/GENERIC.hints (revision 276985) > > > +++ sys/amd64/conf/GENERIC.hints (revision 276986) > > > @@ -31,3 +31,5 @@ > > > hint.attimer.0.port=3D"0x40" > > > hint.attimer.0.irq=3D"0" > > > hint.wbwd.0.at=3D"isa" > > > +hint.acpi_throttle.0.disabled=3D"1" > > > +hint.p4tcc.0.disabled=3D"1" > > >=20 > > > Does it work if your unset or remove those lines > > > from /boot/device.hints? > > >=20 > >=20 > > YEEESSS ! Thanks for pointing that out! > >=20 > > I have these commented on my loader.conf but I didn't know they were > > active somewhere else. > >=20 > > As far as cpufreq/powerd goes, it's working now and frequencies are > > being throttled but still no cool'n'quiet/hwpstate0 showing on > > dmesg. acpi_throttle attaches to cpu0 but not to the others. >=20 > The acpi_throttle isn't really that helpful though. You probably want > to try to add support for your CPU to the hwpstate driver instead and > leave acpi_throttle disabled. >=20 > Can you run 'kgdb' as root and get the output of 'p amd_pminfo'? (kgdb) p amd_pminfo $1 =3D 2009 > Hmm, do you have an acpi_perf0 device? If not, then your CPU isn't > supported without BIOS help. No acpi_perf0 device present > First check to see if there are any BIOS > options to control CPU throttling that are currently disabled. The only BIOS option that deals with throttling is Cool'n'Quiet, which is enabled. I get this though: [~]>dmesg -a | grep acpi_ =20 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 acpi_button0: on acpi0 acpi_throttle0: on cpu0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 acpi_throttle2: on cpu2 acpi_throttle2: failed to attach P_CNT device_attach: acpi_throttle2 attach returned 6 acpi_throttle3: on cpu3 acpi_throttle3: failed to attach P_CNT device_attach: acpi_throttle3 attach returned 6 acpi_throttle4: on cpu4 acpi_throttle4: failed to attach P_CNT device_attach: acpi_throttle4 attach returned 6 acpi_throttle5: on cpu5 acpi_throttle5: failed to attach P_CNT device_attach: acpi_throttle5 attach returned 6 acpi_throttle6: on cpu6 acpi_throttle6: failed to attach P_CNT device_attach: acpi_throttle6 attach returned 6 acpi_throttle7: on cpu7 acpi_throttle7: failed to attach P_CNT device_attach: acpi_throttle7 attach returned 6 Only acpi_throttle0 gets hooked dev.acpi_throttle.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1 2500/-1 1250/-1 dev.acpi_throttle.0.%parent: cpu0 dev.acpi_throttle.0.%pnpinfo:=20 dev.acpi_throttle.0.%location:=20 dev.acpi_throttle.0.%driver: acpi_throttle dev.acpi_throttle.0.%desc: ACPI CPU Throttling dev.acpi_throttle.%parent And frequencies ARE getting throttled: dev.cpufreq.0.%parent: cpu0 dev.cpufreq.0.%pnpinfo:=20 dev.cpufreq.0.%location:=20 dev.cpufreq.0.%driver: cpufreq dev.cpufreq.0.%desc:=20 dev.cpufreq.%parent:=20 dev.acpi_throttle.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1 2500/-1 1250/-1=20 dev.cpu.0.freq_levels: 3214/-1 2812/-1 2410/-1 2008/-1 1607/-1 1205/-1 803/-1 dev.cpu.0.freq: 1607 dev.cpu.0.freq: 2008 dev.cpu.0.freq: 2410 dev.cpu.0.freq: 3214 dev.cpu.0.freq: 1205 dev.cpu.0.freq: 803 --=20 Mario Lobo http://www.mallavoodoo.com.br FreeBSD since 2.2.8 [not Pro-Audio.... YET!!] =20 "UNIX was not designed to stop you from doing stupid things,=20 because that would also stop you from doing clever things."