Subject: Re: splx() optimization [was Re: SMP re-eetrancy in "bottom half" drivers]
To: Jason Thorpe <thorpej@shagadelic.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 06/08/2005 20:04:13
On Wed, Jun 08, 2005 at 08:24:05AM -0700, Jason Thorpe wrote:
> >If there's a way to make only parts of the kernel SMP-safe, I'd be
> >interested
> >in working on disks subsystems.
>
> You still need to fix everything at higher IPLs first, because as
> long as you could be interrupted by something that needs to take the
> kernel_lock, you could end up in a deadlock situation.
Hum, yes, thinking more about it I think I understand what you mean.
Unless the low-spl system we want to make smp-safe uses only queues (like
the mbuf queues between device drivers and upper-layer network code) and
no other kernel services, it won't work. For a network device driver
it could work if it doesn't try to allocate or free any mbuf in the
interrupt routine (which, at first glance, would be equivalent to
bump IPL_NET above IPL_VM). This would require changes in the network device
drivers and the way they interfaces with the upper layers. It may be
faster to make IPL_VM SMP-safe first ...
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--