On Sun, Apr 05, 2009 at 01:54:46PM +0200, Manuel Bouyer wrote: > On Sat, Apr 04, 2009 at 08:59:39PM +0000, Andrew Doran wrote: > > There is a minor problem with this. If you look elsewhere in the networking > > code softints and callouts are usually created with flag SOFTINT_MPSAFE, and > > if required the handler takes kernel_lock directly. > > > > The main reason for this is as follows. In the socket layer and pretty much > > eveywhere else we take these locks in the order softnet_lock -> kernel_lock. > > It is permissible to mix ordering between adaptive mutexes/rwlocks and > > kernel_lock. So you can also safely go kernel_lock -> softnet_lock. However, > > this causes the deadlock detection code in mutex_onproc() to fire when there > > is lock contention, leading to a context switch storm.
BTW, could this problem be the reason for the problem in kern/38637 ? Some softnet callback stops from running ... this is on sparc -- Manuel Bouyer <bou...@antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference --