From owner-freebsd-current@FreeBSD.ORG Sun Sep 12 10:31:33 2010 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 F1C30106566C; Sun, 12 Sep 2010 10:31:32 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B93568FC12; Sun, 12 Sep 2010 10:31:31 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA25836; Sun, 12 Sep 2010 13:31:30 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OujqL-000FnC-Vo; Sun, 12 Sep 2010 13:31:30 +0300 Message-ID: <4C8CAC01.70004@icyb.net.ua> Date: Sun, 12 Sep 2010 13:31:29 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100822 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Norikatsu Shigemura References: <4C8BCAC5.5050008@root.org> <4C8C8B64.8020907@FreeBSD.org> <20100912182625.c49d3f1d.nork@FreeBSD.org> <4C8C9F06.4090505@icyb.net.ua> <20100912190537.621e357e.nork@FreeBSD.org> <20100912190952.8c0d5726.nork@FreeBSD.org> <20100912192518.e791c191.nork@FreeBSD.org> In-Reply-To: <20100912192518.e791c191.nork@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alexander Motin , FreeBSD-Current Subject: Re: CPU C-state storange on Panasonic TOUGH BOOK CF-R9 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, 12 Sep 2010 10:31:33 -0000 on 12/09/2010 13:25 Norikatsu Shigemura said the following: > Hi avg. > > On Sun, 12 Sep 2010 19:09:52 +0900 > Norikatsu Shigemura wrote: >> Logic is mistake. I'll re-make a patch and retry. > > I re-tried following patch: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > --- sys/dev/acpica/acpi_cpu.c.orig 2010-09-12 01:31:38.144243000 +0900 > +++ sys/dev/acpica/acpi_cpu.c 2010-09-12 19:11:00.906223222 +0900 > @@ -690,19 +690,11 @@ > sc->cpu_cx_count++; > continue; > case ACPI_STATE_C2: > - if (cx_ptr->trans_lat > 100) { > - ACPI_DEBUG_PRINT((ACPI_DB_INFO, > - "acpi_cpu%d: C2[%d] not available.\n", > - device_get_unit(sc->cpu_dev), i)); > - continue; > - } > sc->cpu_non_c3 = i; > break; > case ACPI_STATE_C3: > default: > - if (cx_ptr->trans_lat > 1000 || > - (cpu_quirks & CPU_QUIRK_NO_C3) != 0) { > - > + if (cpu_quirks & CPU_QUIRK_NO_C3) { > ACPI_DEBUG_PRINT((ACPI_DB_INFO, > "acpi_cpu%d: C3[%d] not available.\n", > device_get_unit(sc->cpu_dev), i)); The above looks good. > @@ -731,6 +723,9 @@ > cx_ptr++; > sc->cpu_cx_count++; > } > +else { > +device_printf(sc->cpu_dev, "DEBUG: cx_ptr->p_lvlx IS NULL.\n"); > +} > } > AcpiOsFree(buf.Pointer); What's this? The indentation is messed up too :-) > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > Test is OK: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > # sysctl hw.acpi.cpu.cx_lowest=C2 && sleep 10 && sysctl dev.cpu.0.cx_usage dev.cpu.1.cx_usage dev.cpu.2.cx_usage dev.cpu.3.cx_usage > hw.acpi.cpu.cx_lowest: C3 -> C2 > dev.cpu.0.cx_usage: 2.37% 97.62% last 3028us > dev.cpu.1.cx_usage: 0.87% 99.12% last 4379us > dev.cpu.2.cx_usage: 0.54% 99.45% last 14314us > dev.cpu.3.cx_usage: 1.36% 98.63% last 16982us > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > But I don't know how I couldn't get C3:-(. > Not reachable my DEBUG code. > > Thank you. acpi_lid0: Lid closed em0: Link is up 1000 Mbps Full Duplex PROCESSOR-0722 [402244] cpu_cx_cst : acpi_cpu0: Got C2 - 245 latency PROCESSOR-0722 [403097] cpu_cx_cst : acpi_cpu1: Got C2 - 245 latency PROCESSOR-0722 [403855] cpu_cx_cst : acpi_cpu2: Got C2 - 245 latency PROCESSOR-0722 [405022] cpu_cx_cst : acpi_cpu3: Got C2 - 245 latency Maybe because of this? It seems like you do something and ACPI disables C3, leaving only C2/ -- Andriy Gapon