Date: Sat, 17 Mar 2007 17:28:03 -0700 From: "Kip Macy" <kip.macy@gmail.com> To: "Robert Watson" <rwatson@freebsd.org> Cc: freebsd-net@freebsd.org, Aniruddha Bohra <bohra@cs.rutgers.edu> Subject: Re: ether_input question Message-ID: <b1fa29170703171728t445212c9r7ee6baeddda41269@mail.gmail.com> In-Reply-To: <20070316141836.J60288@fledge.watson.org> References: <45FA98DD.3080205@cs.rutgers.edu> <20070316141836.J60288@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> The reason the drivers drop their locks is > that the network stack frequently holds locks over calls to driver output > routines. As a result, driver locks tend to follow network stack locks in the > lock order--at least, for drivers that have a single lock covering both send > and receive paths (quite common). As a result, the driver must drop the > driver lock before calling into the stack to avoid a lock order reversal. Just to further clarify the corollary to this statement - drivers that separately lock their softc, tx, and rx queues don't need to drop the lock across if_input as there is no possibility of lock order reversal between the input and the output path. -Kip
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b1fa29170703171728t445212c9r7ee6baeddda41269>