Re: CPU C-state storange on Panasonic TOUGH BOOK CF-R9

From: Norikatsu Shigemura <nork_at_FreeBSD.org>
Date: Sun, 12 Sep 2010 19:25:18 +0900
Hi avg.

On Sun, 12 Sep 2010 19:09:52 +0900
Norikatsu Shigemura <nork_at_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
_at__at_ -690,19 +690,11 _at__at_
 	    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));
_at__at_ -731,6 +723,9 _at__at_
 	    cx_ptr++;
 	    sc->cpu_cx_count++;
 	}
+else {
+device_printf(sc->cpu_dev, "DEBUG: cx_ptr->p_lvlx IS NULL.\n");
+}
     }
     AcpiOsFree(buf.Pointer);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	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.

-- 
Norikatsu Shigemura <nork_at_FreeBSD.org>

Received on Sun Sep 12 2010 - 08:25:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC