Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2015 01:11:41 +1100
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Dmitry Sivachenko <trtrmitya@gmail.com>
Cc:        FreeBSD Stable ML <stable@freebsd.org>, Peter Jeremy <peter@rulingia.com>, nwhitehorn@freebsd.org
Subject:   Re: dev.cpu.0.freq disapeared
Message-ID:  <550ECD9D.2030108@nimnet.asn.au>
In-Reply-To: <77C8F6F7-2C25-4BC5-B373-11441AB58FAD@gmail.com>
References:  <EE8D6553-4319-4CE1-8F73-3244C49F454C@gmail.com> <20150322055323.GA48710@server.rulingia.com> <77C8F6F7-2C25-4BC5-B373-11441AB58FAD@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dmitry Sivachenko wrote:
>> On 22 =D0=BC=D0=B0=D1=80=D1=82=D0=B0 2015 =D0=B3., at 8:53, Peter Jere=
my <peter@rulingia.com>=20
>> wrote:
>>=20
>> On 2015-Mar-22 00:58:55 +0300, Dmitry Sivachenko=20
>> <trtrmitya@gmail.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?550ECD9D.2030108>