[lkml]   [2004]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.31-19

* Ingo Molnar <> wrote:

> ok, this could be ACPI CPU-sleep related. Could you disable all ACPI
> options in your .config (as a workaround), and re-check whether the
> xruns still occur?

i think i found the bug - it's an upstream ACPI bug. Does the patch
below (or the -31-19 kernel, which i've just uploaded) fix the xruns?

the upstream ACPI bug is this: we check need_resched() _before_
disabling preemption. This opens up the following scenario:

swapper: !need_resched()
[IRQ context]
wakes up a task
marks idle task as need-resched

swapper: acpi_processor_idle(); // sleeps until next irq

instant 1msec latency introduced...

normally default_idle() is safe because it re-checks need_resched with
interrupts disabled before it truly halts the CPU. But
acpi_processor_idle() doesnt seem to be doing this! Your trace clearly
shows a missed preemption due to ACPI. I'm wondering why no-one has
triggered this before, it's a really bad bug that should be fixed in


Signed-off-by: Ingo Molnar <>

--- linux/drivers/acpi/processor.c.orig
+++ linux/drivers/acpi/processor.c
@@ -370,6 +370,15 @@ acpi_processor_idle (void)

+ /*
+ * Check whether we truly need to go idle, or should
+ * reschedule:
+ */
+ if (unlikely(need_resched())) {
+ local_irq_enable();
+ return;
+ }
cx = &(pr->power.states[pr->power.state]);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 14:08    [W:0.075 / U:2.584 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site