Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2001 09:20:01 -0700 (PDT)
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/29845: 4.4-PRERELEASE crashes under heavy net I/O 
Message-ID:  <200108211620.f7LGK1s79960@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/29845; it has been noted by GNATS.

From: Ian Dowse <iedowse@maths.tcd.ie>
To: Warner Losh <imp@harmony.village.org>
Cc: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>,
	freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/29845: 4.4-PRERELEASE crashes under heavy net I/O 
Date: Tue, 21 Aug 2001 17:13:26 +0100

 In message <200108211539.f7LFdoW65851@harmony.village.org>, Warner Losh writes:
 >Here's a simple fix you can try.  I don't see how this would help, but 
 >if it does, we know what the problem is.  Ian suggested this a while
 >ago, and I'm still not sure how this could be a problem, but if it is
 >Ian's suggestions are right.
 
 No, I was confused when I suggested this to you :-) It is too late
 when pcic_pci_intr() is called, because at that point a critical
 section of some network code has already been interrupted. Once a
 NIC has registered a net interrupt on IRQ X, splimp() should mask
 IRQ X, but here the pcic code never changes the interrupt mask when
 a NIC registers its interrupt.
 
 e.g. consider some network code that does splimp():
 
 	s = splimp();
 
 	(critical stuff where no net interrupts should occur)
 
 	<pcic interrupt occurs>
 		pcic_pci_intr() called
 			s = splhigh();
 			(this blocks further interrupts)
 
 			NIC ISR called
 				(messes with splimp-protected state)
 
 			splx(x);
 		pcic_pci_intr() returns
 	<pcic interrupt end>
 
 	(network code finds its state messed up)
 
 	splx(s);
 
 When the pccard NIC sets up its interrupt, it needs to go through
 all the mask adjustment behind bus_generic_setup_intr() to ensure
 that the first splimp() call above actually blocks the pcic interrupts
 too. That's why I'm suggesting using bus_generic_setup_intr() either
 within or instead of pcic_pci_setup_intr().
 
 Ian
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108211620.f7LGK1s79960>