Messages in this thread | | | Subject | Re: [PATCH 2.6.10-mm2] Fix preemption race [1/3] (Core) | From | Thomas Gleixner <> | Date | Mon, 10 Jan 2005 11:14:44 +0100 |
| |
On Mon, 2005-01-10 at 10:15, Ingo Molnar wrote: > * tglx@linutronix.de <tglx@linutronix.de> wrote: > > > The idle-thread-preemption-fix.patch introduced a race, which is not > > critical, but might give us an extra turn through the scheduler. When > > interrupts are reenabled in entry.c and an interrupt occures before we > > reach the add_preempt_schedule() in preempt_schedule we get > > rescheduled again in the return from interrupt path. > > i agree that there's a race. I solved this in the -RT patchset a couple > of weeks ago, but in a different wasy. I introduced the > preempt_schedule_irq() function and this solves the problem via keeping > the whole IRQ-preemption path irqs-off. This has the advantage that if > an IRQ signals preemption of a task and the kernel is immediately > preemptable then we are able to hit that task atomically without > re-enabling IRQs again. I'll split out this patch - can you see any > problems with the preempt_schedule_irq() approach?
No. I did not look into your RT patch for this, but please have a look at RMK's ARM code, as he is doing some sanity check on thread_info->preemption down there.
tglx
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |