From owner-freebsd-current@FreeBSD.ORG Sun Jul 20 01:00:37 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 692C3106564A for ; Sun, 20 Jul 2008 01:00:37 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id D538A8FC12 for ; Sun, 20 Jul 2008 01:00:36 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl133-207.kln.forthnet.gr [77.49.252.207]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-4) with ESMTP id m6K10O0c001521 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 20 Jul 2008 04:00:30 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m6K10NP4003717; Sun, 20 Jul 2008 04:00:23 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m6K10M5M003716; Sun, 20 Jul 2008 04:00:22 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: "Alexandre \"Sunny\" Kovalenko" References: <87prpcjrsk.fsf@kobe.laptop> <1216501388.971.6.camel@RabbitsDen> <87mykd5wsl.fsf@kobe.laptop> <87tzelebd7.fsf@kobe.laptop> <1216508230.2172.8.camel@RabbitsDen> <87iqv1h1g8.fsf@kobe.laptop> <1216514182.2172.28.camel@RabbitsDen> Date: Sun, 20 Jul 2008 04:00:22 +0300 In-Reply-To: <1216514182.2172.28.camel@RabbitsDen> (Alexandre Kovalenko's message of "Sat, 19 Jul 2008 20:36:22 -0400") Message-ID: <874p6lfjyx.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m6K10O0c001521 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.787, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.61, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-current@freebsd.org Subject: Re: Broken APIC on my laptop or bug in FreeBSD? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2008 01:00:37 -0000 On Sat, 19 Jul 2008 20:36:22 -0400, "Alexandre \"Sunny\" Kovalenko" wrote: > What I meant is that my laptop, runnig RELENG_7 is pretty happy with > "C2" (set through /etc/rc.conf as performance_cx_lowest="C2", and even > "C3" (set through /etc/sysctl.conf as dev.cpu.1.cx_lowest=C3), so long > as cpu0 is not allowed to go into C3. You seemed to indicate that in > your case nothing but "C1" worked. If you just did not try the > configuration above, would you, please, try it and see if it works. > Apart from, hopefully, giving someone the data point, it will make > your laptop cooler and less power hungry. Ah, now I get it :) Well, I did try the following after booting with both CPUs in C1 state: (1) hw.acpi.cpu.cx_lowest: C1 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_lowest: C2 I left the laptop to boot with both CPUs in C1, and then after a while I manually set dev.cpu.0.cx_lowest=C2. This setup seems ok. I can see processes being scheduled on both cpu.0 and cpu.1 and there's no "freeze" when the laptop is idle. (2) hw.acpi.cpu.cx_lowest: C1 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_lowest: C3 Same as above, only this time I set dev.cpu.0.cx_lowest=C3. (3) hw.acpi.cpu.cx_lowest: C1 dev.cpu.0.cx_lowest: C2 dev.cpu.0.cx_lowest: C2 Not ok. When the laptop stays idle for some time, it starts getting too slow to type stuff in a terminal, and after a while I get `calcru: runtime went backwards' messages. I don't know if being scheduled on cpu.1 when it is in C2/C3 state has any measurable impact on user processes. Should I leave the settings to option (1) or (2) above for a while? Is there any way to find out if this causes any problems? Right now I am running for a couple of minutes with $ sysctl -a | fgrep .cx_ hw.acpi.cpu.cx_lowest: C1 dev.cpu.0.cx_supported: C1/1 C2/1 C3/57 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% dev.cpu.1.cx_supported: C1/1 C2/1 C3/57 dev.cpu.1.cx_lowest: C2 dev.cpu.1.cx_usage: 0.00% 100.00% 0.00% and things seem ok so far :-) Thank you for all the help. It's been _very_ useful :) > Few more data points: > -- CPU0 and CPU1 are somehow not treated interchangeably by FreeBSD. > -- at some point when earth was warm and 7.0 was CURRENT, "C3" used to > work on my laptop, even on CPU0. > -- I have not filed a PR. If you think it is warranted, you could do it > or I can -- it's just I did a couple of embarrassing ones and got > somewhat trigger-shy ;) Heh. I've filed my own share of bogus PRs too. Please don't feel shy, and just report whatever seems out of the ordinary. It's better to have a few extra PRs that are not really bugs, than never-fixed bugs :)