lkml.org 
[lkml]   [2002]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] big IRQ lock removal, 2.5.27-G0

On Wed, 24 Jul 2002, Oleg Nesterov wrote:

> > okay - i've fixed irq_exit() once more in -G4
>
> found G5, your forgot to add preempt_disable() in irq_exit()
>
> #define irq_exit()
> do {
> + preempt_disable();
> preempt_count() -= IRQ_EXIT_OFFSET;
> if (!in_interrupt() && softirq_pending(smp_processor_id()))
>
> Oleg.

nope, it's tricky, check out the define of IRQ_EXIT_OFFSET, it has the
plus 1 count added already.

using preempt_disable() has the problem of putting a barrier() between the
++ and the -IRQ_OFFSET, causing one more instruction to be generated.

but there was another (not too critical) bug here - irq_enter() needs to
have a barrier() after manipulating the preemption count, irq_exit() needs
to have a barrier() before. Fixed in my tree.

Ingo

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.442 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site