Bug 2280 - C1 uses "halt" instead of "monitor/mwait"
Summary: C1 uses "halt" instead of "monitor/mwait"
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Processor (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Venkatesh Pallipadi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-09 22:10 UTC by Len Brown
Modified: 2004-11-15 19:41 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.4-rc2
Tree: Mainline
Regression: ---


Attachments
simple patch to properly select the idle routine (6.81 KB, patch)
2004-03-24 10:20 UTC, Venkatesh Pallipadi
Details | Diff
simple patch to properly select the idle routine (6.81 KB, patch)
2004-03-24 10:20 UTC, Venkatesh Pallipadi
Details | Diff
proper C1 state support (4.56 KB, patch)
2004-10-26 13:52 UTC, Venkatesh Pallipadi
Details | Diff

Description Len Brown 2004-03-09 22:10:26 UTC
the ACPI-enabled kernel calls "halt" in the idle loop for C1,
but it never calls "monitor/mwait", which if available
would save more power.
Comment 1 Venkatesh Pallipadi 2004-03-10 14:37:18 UTC
OK. Will come up with a patch for this.
To summarize, ideal idle should be

Default Rules:
non monitor-mwait machines: halt_idle
monitor-mwait machines: mwait_idle
Acpi + non monitor-mwait machines: acpi_idle C1(halt)/C2/C3
Acpi + monitor-mwait machines: acpi_idle C1(mwait_idle)/C2/C3

User can override this with - halt_idle, poll_idle or mwait_idle(if processor 
supports it). Then, ignore the above default rules.
Comment 2 Venkatesh Pallipadi 2004-03-24 10:20:20 UTC
Created attachment 2390 [details]
simple patch to properly select the idle routine
Comment 3 Venkatesh Pallipadi 2004-03-24 10:20:34 UTC
Created attachment 2391 [details]
simple patch to properly select the idle routine
Comment 4 Venkatesh Pallipadi 2004-10-26 13:52:19 UTC
Created attachment 3891 [details]
proper C1 state support


Attached is the new patch (against 2.6.9). Fixes the following:
- We should enable C-states in processor driver only when user hasn't specified
his own idle routine.
- For C1, we should be using what system would have used when C-state support
is not there and not safe_halt(). Say, if system supports monitor/mwait, we
have to use that instead of halt, for C1.
Comment 5 Len Brown 2004-10-27 22:38:44 UTC
applied patch in comment #4
Comment 6 Len Brown 2004-11-15 19:41:13 UTC
shipped in Linux 2.6.10-rc2 - closed. 

Note You need to log in before you can comment on or make changes to this bug.