Date: Sun, 12 Sep 2010 13:31:29 +0300 From: Andriy Gapon <avg@icyb.net.ua> To: Norikatsu Shigemura <nork@FreeBSD.org> Cc: Alexander Motin <mav@FreeBSD.org>, FreeBSD-Current <freebsd-current@FreeBSD.org> Subject: Re: CPU C-state storange on Panasonic TOUGH BOOK CF-R9 Message-ID: <4C8CAC01.70004@icyb.net.ua> In-Reply-To: <20100912192518.e791c191.nork@FreeBSD.org> References: <4C8BCAC5.5050008@root.org> <mailpost.1284277196.1767764.83548.mailing.freebsd.current@FreeBSD.cs.nctu.edu.tw> <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>
next in thread | previous in thread | raw e-mail | index | archive | help
on 12/09/2010 13:25 Norikatsu Shigemura said the following:
> Hi avg.
>
> On Sun, 12 Sep 2010 19:09:52 +0900
> Norikatsu Shigemura <nork@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C8CAC01.70004>
