Subject: How to protect pool operations from interrupts ?
To: None <tech-kern@netbsd.org, tech-net@netbsd.org>
From: Zdenek Salvet <salvet@ics.muni.cz>
List: tech-kern
Date: 06/12/2000 20:19:44
Hello,
it seems that pool_get(), pool_put() etc. are protected from concurrent
kernel threads with simple_lock(). But simple_lock does does nothing
in !MULTIPROCESSOR case and does not block any interrupts.
I have seen the following scenario:
arpresolve()
m_freem()
-interrupt-
tulip...intr()
MGETHDR()
-crash-
Should we protect each m_freem() called from code running with lower spl
( s=splnet();m_freem();splx(s) ) or should pool protect itself like
malloc()/free() do ?
How about non-mbuf pools ?
--
Zdenek Salvet salvet@ics.muni.cz
Ustav vypocetni techniky Masarykovy univerzity, Brno
tel.: ++420-5-41 512 257 fax: ++420-5-41 212 747
----------------------------------------------------------------------------
God isn't dead, He's just trying to avoid the draft.