diff options
author | Andi Kleen <ak@suse.de> | 2006-01-11 16:44:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 22:04:55 -0500 |
commit | 95833c83f3b812c78e48db4eaa19f6c74958470b (patch) | |
tree | 8ad17da708141d66cf53c2113b4fe1710af929ec /arch/x86_64/kernel/mce_amd.c | |
parent | 6b050f8075823b0d9ec4fad38f4f552b74e5c5af (diff) |
[PATCH] x86_64: Add idle notifiers
This adds a new notifier chain that is called with IDLE_START
when a CPU goes idle and IDLE_END when it goes out of idle.
The context can be idle thread or interrupt context.
Since we cannot rely on MONITOR/MWAIT existing the idle
end check currently has to be done in all interrupt
handlers.
They were originally inspired by the similar s390 implementation.
They have a variety of applications:
- They will be needed for CONFIG_NO_IDLE_HZ
- They can be used for oprofile to fix up the missing time
in idle when performance counters don't tick.
- They can be used for better C state management in ACPI
- They could be used for microstate accounting.
This is just infrastructure so far, no users.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/mce_amd.c')
-rw-r--r-- | arch/x86_64/kernel/mce_amd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c index 1f76175ace02..0b62a44ab34b 100644 --- a/arch/x86_64/kernel/mce_amd.c +++ b/arch/x86_64/kernel/mce_amd.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/mce.h> | 27 | #include <asm/mce.h> |
28 | #include <asm/msr.h> | 28 | #include <asm/msr.h> |
29 | #include <asm/percpu.h> | 29 | #include <asm/percpu.h> |
30 | #include <asm/idle.h> | ||
30 | 31 | ||
31 | #define PFX "mce_threshold: " | 32 | #define PFX "mce_threshold: " |
32 | #define VERSION "version 1.00.9" | 33 | #define VERSION "version 1.00.9" |
@@ -140,6 +141,7 @@ asmlinkage void mce_threshold_interrupt(void) | |||
140 | struct mce m; | 141 | struct mce m; |
141 | 142 | ||
142 | ack_APIC_irq(); | 143 | ack_APIC_irq(); |
144 | exit_idle(); | ||
143 | irq_enter(); | 145 | irq_enter(); |
144 | 146 | ||
145 | memset(&m, 0, sizeof(m)); | 147 | memset(&m, 0, sizeof(m)); |