From owner-freebsd-current@FreeBSD.ORG Sun Sep 12 09:36:11 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 D2C3A106566C; Sun, 12 Sep 2010 09:36:11 +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 AC80A8FC16; Sun, 12 Sep 2010 09:36:10 +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 MAA25347; Sun, 12 Sep 2010 12:36:08 +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 1Ouiym-000Fkb-GH; Sun, 12 Sep 2010 12:36:08 +0300 Message-ID: <4C8C9F06.4090505@icyb.net.ua> Date: Sun, 12 Sep 2010 12:36:06 +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> In-Reply-To: <20100912182625.c49d3f1d.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 09:36:11 -0000 on 12/09/2010 12:26 Norikatsu Shigemura said the following: > Hi avg and mav. > > On Sun, 12 Sep 2010 11:12:20 +0300 > Alexander Motin wrote: >>>>> PROCESSOR-0696 [257314] cpu_cx_cst : acpi_cpu3: C2[1] not available. >>>>> PROCESSOR-0730 [257314] cpu_cx_cst : acpi_cpu3: Got C3 - 245 latency >>>> I think the issue is that C2 is not available for some reason and thus >>>> C3 can't be used either. The way to tell is to use acpidump and look for >>>> the CPU objects' _CST fields. >>> The "not available" message means that transition latency is defined too high. >>> That is, in this case latency is greater than 100 for C2. >> Just an idea. Limits of 100 and 1000 are defined for detection of >> C-states using P_LVLx_LAT registers. Because _CST explicitly specifies > > Oops! I forgot. Thank you, I tried. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > --- sys/dev/acpica/acpi_cpu.c.orig 2010-09-12 01:31:38.144243000 +0900 > +++ sys/dev/acpica/acpi_cpu.c 2010-09-12 18:06:14.651938193 +0900 > @@ -597,7 +597,7 @@ > /* Validate and allocate resources for C2 (P_LVL2). */ > gas.SpaceId = ACPI_ADR_SPACE_SYSTEM_IO; > gas.BitWidth = 8; > - if (AcpiGbl_FADT.C2Latency <= 100) { > + if (AcpiGbl_FADT.C2Latency <= 1000) { > gas.Address = sc->cpu_p_blk + 4; > acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc->cpu_rid, > &gas, &cx_ptr->p_lvlx, RF_SHAREABLE); > @@ -613,7 +613,7 @@ > return; > > /* Validate and allocate resources for C3 (P_LVL3). */ > - if (AcpiGbl_FADT.C3Latency <= 1000 && !(cpu_quirks & CPU_QUIRK_NO_C3)) { > + if (AcpiGbl_FADT.C3Latency <= 10000 && !(cpu_quirks & CPU_QUIRK_NO_C3)) { > gas.Address = sc->cpu_p_blk + 5; > acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &sc->cpu_rid, &gas, > &cx_ptr->p_lvlx, RF_SHAREABLE); The above changes are incorrect. > @@ -690,7 +690,7 @@ > sc->cpu_cx_count++; > continue; > case ACPI_STATE_C2: > - if (cx_ptr->trans_lat > 100) { > + if (cx_ptr->trans_lat > 1000) { > ACPI_DEBUG_PRINT((ACPI_DB_INFO, > "acpi_cpu%d: C2[%d] not available.\n", > device_get_unit(sc->cpu_dev), i)); > @@ -700,7 +700,7 @@ > break; > case ACPI_STATE_C3: > default: > - if (cx_ptr->trans_lat > 1000 || > + if (cx_ptr->trans_lat > 10000 || > (cpu_quirks & CPU_QUIRK_NO_C3) != 0) { > > ACPI_DEBUG_PRINT((ACPI_DB_INFO, You should simply remove the check instead of bumping the threshold. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > But cx_lowest is not changed: Why do you expect it to be changed? > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > $ sysctl -a | grep cx > hw.acpi.cpu.cx_lowest: C1 > dev.cpu.0.cx_supported: C1/3 C2/245 cx_supported has C2 now though. > dev.cpu.0.cx_lowest: C1 > dev.cpu.0.cx_usage: 100.00% 0.00% last 3641us > dev.cpu.1.cx_supported: C1/3 C2/245 > dev.cpu.1.cx_lowest: C1 > dev.cpu.1.cx_usage: 100.00% 0.00% last 798us > dev.cpu.2.cx_supported: C1/3 C2/245 > dev.cpu.2.cx_lowest: C1 > dev.cpu.2.cx_usage: 100.00% 0.00% last 158us > dev.cpu.3.cx_supported: C1/3 C2/245 > dev.cpu.3.cx_lowest: C1 > dev.cpu.3.cx_usage: 100.00% 0.00% last 227us -- Andriy Gapon