Date: Sun, 3 Feb 2008 09:33:28 +0000 (GMT) From: Robert Watson <rwatson@FreeBSD.org> To: Maxim Zhuravlev <thIOretic@FreeBSD.org> Cc: freebsd-arch@freebsd.org, Hans Petter Selasky <hselasky@c2i.net> Subject: Re: [RFC] Some new generic device features. Message-ID: <20080203093009.R28171@fledge.watson.org> In-Reply-To: <fe052a80802010649q1cf47f5an6a4d34474a1ed9d7@mail.gmail.com> References: <fe052a80801311102x125a8534re712f6411acf29e2@mail.gmail.com> <200801312135.48600.hselasky@c2i.net> <fe052a80802010649q1cf47f5an6a4d34474a1ed9d7@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 1 Feb 2008, Maxim Zhuravlev wrote: > 2008/1/31, Hans Petter Selasky <hselasky@c2i.net>: > >> Some general comments: >> >> How does it handle mutexes? > > By now mutexes are used by io subsystem: All input/output requests (iors) > and queues of iors are guarded by spin mutexes. As for devices, their NewBus > sided structures will be guarded by (spin?) mutexes. Generic question: is it desirable/necessary to do this using [solely] spin mutexes? They are more expensive than regular mutexes (since they also disable interrupts), and are not generally necessary unless code is running under the scheduler or in a fast interrupt context. There are good reasons to write device driver code that runs in the fast interrupt context, but serious work (i.e., passing things up and down higher level stacks such as CAM, the network stack, ttys, etc) generally happens outside of that context. If some of this necessarily runs in those sensitive contexts, is it the case that it mostly does? Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080203093009.R28171>