Re: IEEE80211_LOCK/WI_LOCK concerns in 802.11 framework
"Sam Leffler" <[email protected]> Tue, 13 May 2003 18:43:58 -0700
| Newsgroups | gmane.network.wireless.bsd.general |
|---|---|
| Organization | Errno Consulting |
| Message-ID | <[email protected]> |
> Jason Thorpe points out today that the semantics of splnet are a
> lot different from the locking primitive in FreeBSD. Consequently,
> certain locking patterns that are safe with NetBSD's implementation of
> IEEE80211_LOCK/WI_LOCK will deadlock FreeBSD.
>
> I guess that FreeBSD uses the new locking mechanism for efficiency on
> multiprocessor systems?
>
> Maybe the set of locking macros in common needs to be enriched, with
> four or more macros instead of two? For example, maybe a pair that
> block/unblock interrupts, and another pair that synchronize access to
> data structures (a no-op in NetBSD, a mutex lock in Free)?
>
> Thoughts?
Locking in 5.x is different because the kernel is preemptable (sic?). This
is independent of SMP/UP.
FWIW I've redone the locking in the 802.11 code for FreeBSD. I also added a
reference count to each node to deal with many locking issues. I'm trying
to get you my changes to look at but it would help if you'd respond to my
email.
Sam
--
*bsd wireless list, a bawug thing <http://www.bawug.org/>
[un]subscribe: http://lists.bawug.org/mailman/listinfo/bsd-wireless/