Date: Mon, 14 Dec 2009 11:51:47 -0800 From: Jack Vogel <jfvogel@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: Jack F Vogel <jfv@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r200523 - head/sys/dev/e1000 Message-ID: <2a41acea0912141151p5d596118h6900ea8e2731256f@mail.gmail.com> In-Reply-To: <200912141431.10603.jhb@freebsd.org> References: <200912141843.nBEIhIsA034642@svn.freebsd.org> <200912141431.10603.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Well, its a unique lock in the shared code, and I was already naming the other em locks, if there is some big loss in my doing that I don't have any big emotional investment in them being that way :) Jack On Mon, Dec 14, 2009 at 11:31 AM, John Baldwin <jhb@freebsd.org> wrote: > On Monday 14 December 2009 1:43:18 pm Jack F Vogel wrote: > > Author: jfv > > Date: Mon Dec 14 18:43:18 2009 > > New Revision: 200523 > > URL: http://svn.freebsd.org/changeset/base/200523 > > > > Log: > > Remove the MTX_SPIN flag to the shared code MUTEX > > as it was causing a panic, also took the opportunity > > to rename the lock for clarity. > > > > Modified: > > head/sys/dev/e1000/e1000_osdep.h > > > > Modified: head/sys/dev/e1000/e1000_osdep.h > > > > ============================================================================== > > --- head/sys/dev/e1000/e1000_osdep.h Mon Dec 14 18:27:34 2009 > (r200522) > > +++ head/sys/dev/e1000/e1000_osdep.h Mon Dec 14 18:43:18 2009 > (r200523) > > @@ -82,8 +82,7 @@ > > /* Mutex used in the shared code */ > > #define E1000_MUTEX struct mtx > > #define E1000_MUTEX_INIT(mutex) mtx_init((mutex), #mutex, \ > > - MTX_NETWORK_LOCK, \ > > - MTX_DEF | MTX_SPIN) > > + "E1000 Shared Lock", MTX_DEF) > > #define E1000_MUTEX_DESTROY(mutex) mtx_destroy(mutex) > > #define E1000_MUTEX_LOCK(mutex) mtx_lock(mutex) > > #define E1000_MUTEX_TRYLOCK(mutex) mtx_trylock(mutex) > > Hmm, most NIC drivers use MTX_NETWORK_LOCK so that WITNESS will report LORs > that happen if any two NIC drivers locks "cross" (e.g. if one driver leaked > a > lock while passing a packet up the stack that was forwarded to another > interface). Not sure if that is relevant to this particular lock though. > > -- > John Baldwin >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2a41acea0912141151p5d596118h6900ea8e2731256f>