mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [patch] severe softirq handling performance bug, fix, 2.4.5
@ 2001-05-26 23:55 David S. Miller
  2001-05-27 19:00 ` [patch] softirq-2.4.5-B0 Ingo Molnar
  2001-05-27 19:15 ` David S. Miller
  0 siblings, 2 replies; 5+ messages in thread
From: David S. Miller @ 2001-05-26 23:55 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, Linus Torvalds, Alan Cox, Alexey Kuznetsov


Ingo Molnar writes:
 > (unlike bottom halves, soft-IRQs do not preempt kernel code.)
 ...

Since when do we have this rule? :-)

 > the two error cases are:
 > 
 >  #1 hard-IRQ interrupts user-space code, activates softirq, and returns to
 >     user-space code
 > 
 >  #2 hard-IRQ interrupts the idle task, activates softirq and returns to
 >     the idle task.
 > 
 > category #1 is easy to fix, in entry.S we have to check active softirqs
 > not only the exception and ret-from-syscall cases, but also in the
 > IRQ-ret-to-userspace case.
 > 
 > category #2 is subtle, because the idle process is kernel code, so
 > returning to it we do not execute active softirqs. The main two types of
 > idle handlers both had a window do 'miss' softirq execution:

Ingo, I don't think this is the fix.

You should check Softirqs on return from every single IRQ.
In do_softirq() it will make sure that we won't run softirqs
while already doing so or being already nested in a hard-IRQ.

Every port works this way, I don't know where you got this "soft-IRQs
cannot run when returning to kernel code" rule, it simply doesn't
exist.

And looking at the x86 code, I don't even understand how your fixes
can make a difference, what about the do_softirq() call in
arch/i386/kernel/irq.c:do_IRQ()???  That should be taking care of all
these "error cases" right?

Later,
David S. Miller
davem@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-05-27 21:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <15120.16986.610478.279574@pizda.ninka.net.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.33.0105271020310.1667-200000@localhost.localdomain.suse.lists.linux.kernel>
     [not found]   ` <15121.21054.657593.830199@pizda.ninka.net.suse.lists.linux.kernel>
2001-05-27 21:17     ` [patch] softirq-2.4.5-B0 Andi Kleen
2001-05-27 21:19       ` Ingo Molnar
2001-05-26 23:55 [patch] severe softirq handling performance bug, fix, 2.4.5 David S. Miller
2001-05-27 19:00 ` [patch] softirq-2.4.5-B0 Ingo Molnar
2001-05-27 19:15 ` David S. Miller
2001-05-27 19:19   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®