Port-i386 archive

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

Re: mfi(4) fixes from OpenBSD....



On Mon, Feb 06, 2012 at 12:34:14PM -0800, Greg A. Woods wrote:
> Hmmm.....
> 
> I see that spl(9) says that soft interrupts at or below IPL_SOFTSERIAL
> "may acquire adaptive mutexes".  That would include IPL_SOFTBIO, but not
> IPL_BIO (which is generally equivalent to IPL_VM).
> 
> I don't quite understand the issue though because on the other hand
> mutex(9) says that spin mutexes can be acquired at IPL_VM or even
> higher (right up to IPL_HIGH).

yes.

> 
> If I understand correctly all spl(9) use should be migrated to use
> mutex(9), but in the mean time a slow migration should be fine while
> both are in use, at least for separate purposes, I think.

it opens the door for bugs: you think something is protected with a mutex,
and it's not really. You use mutex or spl, but you don't mix both in
the same piece of code (and, if you're using spl-style locking you're
still under KERNEL_LOCK, and the mutex doesn't buy you anything).

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


Home | Main Index | Thread Index | Old Index