Bug 2280

Summary: C1 uses "halt" instead of "monitor/mwait"
Product: ACPI Reporter: Len Brown (lenb)
Component: Power-ProcessorAssignee: Venkatesh Pallipadi (venki)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, linux
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.4-rc2 Subsystem:
Regression: --- Bisected commit-id:
Attachments: simple patch to properly select the idle routine
simple patch to properly select the idle routine
proper C1 state support

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.