on 12/09/2010 13:25 Norikatsu Shigemura said the following: > Hi avg. > > On Sun, 12 Sep 2010 19:09:52 +0900 > Norikatsu Shigemura <n...@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 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"