From owner-freebsd-stable@FreeBSD.ORG Sun Mar 22 14:12:05 2015 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99F754AC; Sun, 22 Mar 2015 14:12:05 +0000 (UTC) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D347D402; Sun, 22 Mar 2015 14:12:03 +0000 (UTC) Received: from t23.smithi.id.au (ozone [115.70.72.192]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id t2MEBkdj070816; Mon, 23 Mar 2015 01:11:52 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Message-ID: <550ECD9D.2030108@nimnet.asn.au> Date: Mon, 23 Mar 2015 01:11:41 +1100 From: Ian Smith Organization: Nimbin Network Association User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.23) Gecko/20091022 SeaMonkey/1.1.18 MIME-Version: 1.0 To: Dmitry Sivachenko Subject: Re: dev.cpu.0.freq disapeared References: <20150322055323.GA48710@server.rulingia.com> <77C8F6F7-2C25-4BC5-B373-11441AB58FAD@gmail.com> In-Reply-To: <77C8F6F7-2C25-4BC5-B373-11441AB58FAD@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Stable ML , Peter Jeremy , nwhitehorn@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 14:12:05 -0000 Dmitry Sivachenko wrote: >> On 22 =D0=BC=D0=B0=D1=80=D1=82=D0=B0 2015 =D0=B3., at 8:53, Peter Jere= my =20 >> wrote: >>=20 >> On 2015-Mar-22 00:58:55 +0300, Dmitry Sivachenko=20 >> wrote: >>> I have a machine with the following processor: >>>=20 >>> CPU: Intel(R) Xeon(R) CPU E5620 @ 2.40GHz (2400.14-MHz >>> K8-class CPU) Origin=3D"GenuineIntel" Id=3D0x206c2 Family=3D0x6=20 >>> Model=3D0x2c Stepping=3D2 >> ... >>> After I upgraded to 10.1-STABLE #0 r279956, this sysctl=20 >>> disapeared. % sysctl dev.cpu.0.freq sysctl: unknown oid=20 >>> 'dev.cpu.0.freq': No such file or directory % >> What OIDs do you have? Does dev.cpu.0 exist? How about dev.cpu? >=20 > dev.cpu.0 does exist. It could be helpful to show all of: % sysctl dev.cpu % sysctl dev.est # if you have that? % sysctl -a | grep freq | grep -v time both before and after re-enabling p4tcc. > I found the problematic change: >=20 > Author: nwhitehorn Date: Sun Jan 11 17:10:07 2015 New Revision:=20 > 276986 URL: https://svnweb.freebsd.org/changeset/base/276986 >=20 > Log: MFC r265329: Disable ACPI and P4TCC throttling by default,=20 > following discussion on freebsd-current. These CPU speed control=20 > techniques are usually unhelpful at best. For now, continue building=20 > the relevant code into GENERIC so that it can trivially be re-enabled > at runtime if anyone wants it. >=20 > Modified: stable/10/sys/amd64/conf/GENERIC.hints=20 > =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=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/sys/amd64/conf/GENERIC.hints Sun Jan 11 17:00:24 2015=20 > (r276985) +++ stable/10/sys/amd64/conf/GENERIC.hints Sun Jan 11=20 > 17:10:07 2015 (r276986) @@ -31,3 +31,5 @@ hint.attimer.0.at=3D"isa"=20 > hint.attimer.0.port=3D"0x40" hint.attimer.0.irq=3D"0"=20 > hint.wbwd.0.at=3D"isa" +hint.acpi_throttle.0.disabled=3D"1"=20 > +hint.p4tcc.0.disabled=3D"1" >=20 >=20 > If I remove that hint.p4tcc.0.disabled=3D"1" from device.hints,=20 > dev.cpu.0.freq appears back again. 'Trivial re-enabling' would be adding hint.p4tcc.0.disabled=3D"0" to /boot/loader.conf. This seems very strange though, if it really is due solely to disabling p4tcc and acpi_throttle. > I am using dev.cpu.0.freq to ensure that processor is running at=20 > expected frequency (with some buggy BIOSes or buggy BIOS options=20 > combinations it is possible to end up with machine running at half=20 > frequency). Are you not running powerd? Of course powerd won't start if it can't get dev.cpu.0.freq but you can ordinarily use it to set lowest and/or highest freqs. Once FreeBSD starts, BIOS settings should have little do with it, AFAIK, except how they might set freq before powerd starts. > Does it really hurt to have this sysctl available? Why it was=20 > disabled by default? It's a long story; (a) short story is using it to vary freqs doesn't save any power, but makes powerd work harder matching freq to load. > (I am not discussing hint.acpi_throttle.0.disabled here, just=20 > hint.p4tcc.0.disabled). Some or many systems will use ACPI throttling instead if p4tcc (or equivalent on AMD or other processors) isn't enabled, so they both need disabling to run 'raw' EST or equivalent. A link to a verbose boot would be good, before and after if possible. cheers, Ian