From owner-freebsd-current@FreeBSD.ORG Mon Jul 21 22:17:49 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 781081065676 for ; Mon, 21 Jul 2008 22:17:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id DF7758FC22 for ; Mon, 21 Jul 2008 22:17:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m6LMHdxS085114; Mon, 21 Jul 2008 18:17:40 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 21 Jul 2008 17:27:36 -0400 User-Agent: KMail/1.9.7 References: <87prpcjrsk.fsf@kobe.laptop> <1216514182.2172.28.camel@RabbitsDen> <874p6lfjyx.fsf@kobe.laptop> In-Reply-To: <874p6lfjyx.fsf@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807211727.36427.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 21 Jul 2008 18:17:40 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/7771/Mon Jul 21 17:09:37 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Giorgos Keramidas , "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: Mon, 21 Jul 2008 22:17:49 -0000 On Saturday 19 July 2008 09:00:22 pm Giorgos Keramidas wrote: > 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? 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. -- John Baldwin