Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/net



On Sat, Apr 04, 2009 at 08:59:39PM +0000, Andrew Doran wrote:
> On Sat, Apr 04, 2009 at 09:04:36PM +0900, Masao Uebayashi wrote:
> 
> > I think you have to take softnet_lock, since bridge_forward() is called from
> > softint where not lock is held.
> 
> 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.

Actually there are 9 subsystems using softint_establish()/softnet_lock
in sys/net, only one using SOFTINT_MPSAFE. Will is just slow down the
system, or cause hang or panic ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index