From owner-freebsd-current@FreeBSD.ORG Tue Jul 22 00:53:30 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 3B5C01065679 for ; Tue, 22 Jul 2008 00:53:30 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 9A1BA8FC16 for ; Tue, 22 Jul 2008 00:53:29 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl10-74.kln.forthnet.gr [77.49.137.74]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-4) with ESMTP id m6M0rHew005292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 22 Jul 2008 03:53:23 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m6M0rHaK005961; Tue, 22 Jul 2008 03:53:17 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m6M0rGdS005960; Tue, 22 Jul 2008 03:53:17 +0300 (EEST) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: John Baldwin References: <87prpcjrsk.fsf@kobe.laptop> <1216514182.2172.28.camel@RabbitsDen> <874p6lfjyx.fsf@kobe.laptop> <200807211727.36427.jhb@freebsd.org> Date: Tue, 22 Jul 2008 03:53:16 +0300 In-Reply-To: <200807211727.36427.jhb@freebsd.org> (John Baldwin's message of "Mon, 21 Jul 2008 17:27:36 -0400") Message-ID: <87fxq2u4cj.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: m6M0rHew005292 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.263, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.14, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: freebsd-current@freebsd.org, "Alexandre \"Sunny\" Kovalenko" 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: Tue, 22 Jul 2008 00:53:30 -0000 On Mon, 21 Jul 2008 17:27:36 -0400, John Baldwin wrote: > On Saturday 19 July 2008 09:00:22 pm Giorgos Keramidas wrote: >> 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? > > My guess is that when both CPUs are in C2 or lower, the local APIC > timer is getting shut off and that is why your box is no longer > responsive. Fixing this is doable, but not very easy currently. Thanks! I can live with at least one core being in C1. It was mostly an annoying thing that "used to work" and seemed to be broken when I had to replace the old dead laptop. Thanks to Alexandre's excellent help, I can keep working now. If there's any sort of patch or experimental thing I can test, or you happen to think of something that would be nice to try, count me in :)