improve cx_lowest logic
Ian Smith
smithi at nimnet.asn.au
Tue Jul 10 14:27:57 UTC 2012
On Sun, 8 Jul 2012 13:22:49 +0300, Andriy Gapon wrote:
> I would like to propose the following change for review and testing:
> http://people.freebsd.org/~avg/acpi_cpu_cx_lowest.diff
>
> The idea is to separate effective cx_lowest (the limit that the idling code
> should not currently exceed) from user-set cx_lowest limit/target.
> Specifically, this addresses dynamic C-state changes by ACPI platform.
> Currently if a user sets cx_lowest to, say, C3, then available C-states change
> so that C2 is the deepest available C-state and cx_lowest gets overridden to C2
> and all memory of C3 setting is lost.
I wonder if that explains why setting C3 on aforesaid T23 has no effect
(in terms of dev.cpu.0.cx_usage indicating any time spent in C3) unless
the machine happened to be booted up on battery, in which case C3 is
shown as working whenever its enabled, by power_profile or manually?
Would I be wasting my time or yours trying this on an 8.2-R kernel? Or
are there other major changes that probably preclude this? The patch
applies cleanly, but the offsets look a bit daunting:
smithi on t23% patch < acpi_cpu_cx_lowest.diff
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
|index e2a3dbf..e7ca14d 100644
|--- a/sys/dev/acpica/acpi_cpu.c
|+++ b/sys/dev/acpica/acpi_cpu.c
--------------------------
Patching file acpi_cpu.c using Plan A...
Hunk #1 succeeded at 86 (offset -3 lines).
Hunk #2 succeeded at 132 (offset -7 lines).
Hunk #3 succeeded at 170 (offset -3 lines).
Hunk #4 succeeded at 548 (offset -42 lines).
Hunk #5 succeeded at 792 (offset -29 lines).
Hunk #6 succeeded at 787 (offset -42 lines).
Hunk #7 succeeded at 812 (offset -29 lines).
Hunk #8 succeeded at 817 (offset -42 lines).
Hunk #9 succeeded at 1013 (offset -31 lines).
Hunk #10 succeeded at 1010 (offset -42 lines).
Hunk #11 succeeded at 1150 (offset -31 lines).
Hunk #12 succeeded at 1168 (offset -42 lines).
Hunk #13 succeeded at 1208 (offset -31 lines).
done
I hope to get another machine going soon on which I can play with
9-stable, maybe 10, but meanwhile this one is bread and butter ..
cheers, Ian
More information about the freebsd-acpi
mailing list