Bug 5021

Summary: Safely change pm_idle
Product: ACPI Reporter: Shaohua (shaohua.li)
Component: Power-ProcessorAssignee: Len Brown (lenb)
Status: REJECTED INVALID    
Severity: normal CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.13-rc5 Subsystem:
Regression: --- Bisected commit-id:
Attachments: patch to use cpu_idle_wait
patch to use cpu_idle_wait
updated patch
updated patch

Description Shaohua 2005-08-07 23:16:23 UTC
synchronize_sched() only guarantees all CPUs have exited non-preemptive block. 
From my understanding, we want the affected CPU exits idle (in 
acpi_processor_cst_has_changed), so synchronize_sched() doesn
Comment 1 Shaohua 2005-08-07 23:19:11 UTC
Created attachment 5542 [details]
patch to use cpu_idle_wait

The patch does:
It does:
1. change pm idle fix. 
2. cleanup for acpi_processor_get_power_info_cst to make it use less stack
space (acpi_processor_cx is a big structure)
Comment 2 Shaohua 2005-08-07 23:19:20 UTC
Created attachment 5543 [details]
patch to use cpu_idle_wait

The patch does:
It does:
1. change pm idle fix. 
2. cleanup for acpi_processor_get_power_info_cst to make it use less stack
space (acpi_processor_cx is a big structure)
Comment 3 Len Brown 2005-09-02 23:04:38 UTC
patch needs to be re-based on Lindented processor_idle.c
Comment 4 Shaohua 2005-09-07 00:10:20 UTC
Created attachment 5921 [details]
updated patch

A updated patch. It tries to fix all races.
Comment 5 Shaohua 2005-09-14 00:09:31 UTC
Created attachment 6005 [details]
updated patch

My last patch still has a small race window when one CPU is reading per-cpu
idle and another CPU is changing it. This updated one fixes it.
Comment 6 Len Brown 2007-03-08 21:24:39 UTC
patch does not apply to current tree -- re-opening
Comment 7 Shaohua 2007-03-08 23:01:54 UTC
with cpuidle, this patch isn't required.