From owner-freebsd-current@FreeBSD.ORG Sat Jul 19 23:57:43 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 51128106564A for ; Sat, 19 Jul 2008 23:57:43 +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 D4F168FC0A for ; Sat, 19 Jul 2008 23:57:42 +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 m6JNvTUg030368 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 20 Jul 2008 02:57:35 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m6JNvT9N002427; Sun, 20 Jul 2008 02:57:29 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m6JNvSYD002426; Sun, 20 Jul 2008 02:57:28 +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> Date: Sun, 20 Jul 2008 02:57:27 +0300 In-Reply-To: <1216508230.2172.8.camel@RabbitsDen> (Alexandre Kovalenko's message of "Sat, 19 Jul 2008 18:57:10 -0400") Message-ID: <87iqv1h1g8.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: m6JNvTUg030368 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: Sat, 19 Jul 2008 23:57:43 -0000 On Sat, 19 Jul 2008 18:57:10 -0400, "Alexandre \"Sunny\" Kovalenko" wrote: > On Sun, 2008-07-20 at 01:51 +0300, Giorgos Keramidas wrote: >> That was it. Thanks! >> >> # sysctl -a | egrep -e 'cx_(usage|support)' >> dev.cpu.0.cx_supported: C1/1 C2/1 C3/57 >> 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_usage: 100.00% 0.00% 0.00% >> >> With anything except "C1" the CPU is obviously too slow to do >> anything useful :-) > > I guess it got worse in CURRENT: > > # uname -a > FreeBSD RabbitsDen.RabbitsLawn.verizon.net 7.0-STABLE FreeBSD 7.0-STABLE > #0: Wed Jul 9 16:52:35 EDT 2008 > root@RabbitsDen.RabbitsLawn.verizon.net:/usr/obj/usr/src/sys/TPX60 i386 > RabbitsDen# sysctl -a | egrep -e 'cx_(usage|support)' > dev.cpu.0.cx_supported: C1/1 C2/1 C3/57 > dev.cpu.0.cx_usage: 0.00% 100.00% 0.00% > dev.cpu.1.cx_supported: C1/1 C2/1 C3/57 > dev.cpu.1.cx_usage: 0.00% 4.43% 95.56% Now that I know what to look for, I see that what is reported in cx_supported is an array from the `struct acpi_cpu_softc' for each cpu. The initialization of per-cpu dev.cpu.*.cx_xxx values in the softc of the cpu is done in sys/dev/acpica/acpi_cpu.c:acpi_cpu_cx_cst(). I am probably not qualified to say if 'things got worse' in CURRENT, but I wish there was a way to find out *before* entering a state where the CPU is too slow to do basic tasks (i.e. time keeping, and scheduling processes).