2009-09-24 07:06:52

by Luming Yu

[permalink] [raw]
Subject: [RFC PATCH] delete unnecessary wbinvd while entering C3 for Intel CPU

Hi there,

I came across acpi_idle_enter_simple, noticed wbinvd
is an unnecessary overhead for all Intel MP CPUs that
support C3 share cache. And caches should not be
flushed by software while entering C3 type state.

Please review. If make sense, please apply.

Ps. The patch is enclosed in attachment. The inlined one
is c&p of it for reading.


Thanks,
Luming

Signed-off-by: Yu Luming <[email protected]>

processor_idle.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 66393d5..4a2355b 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -894,10 +894,6 @@ static int acpi_idle_enter_simple(struct
cpuidle_device *dev,
* access HPET !
*/
lapic_timer_state_broadcast(pr, cx, 1);
-
- if (cx->type == ACPI_STATE_C3)
- ACPI_FLUSH_CPU_CACHE();
-
kt1 = ktime_get_real();
/* Tell the scheduler that we are going deep-idle: */
sched_clock_idle_sleep_event();


Attachments:
11.patch (507.00 B)