Date: Tue, 18 Aug 2009 15:14:29 +0200 From: Attilio Rao <attilio@freebsd.org> To: Andrew Thompson <andy@fud.org.nz> Cc: current <current@freebsd.org>, Hans Petter Selasky <hselasky@c2i.net> Subject: Re: USB newbus livelock Message-ID: <3bbf2fe10908180614r16c86cb6q2a42f1856b6a0cc7@mail.gmail.com> In-Reply-To: <1280352d0908180604s6b3bf050l9bde52f3c57a5a75@mail.gmail.com> References: <1280352d0908180604s6b3bf050l9bde52f3c57a5a75@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2009/8/18 Andrew Thompson <andy@fud.org.nz>: > Hi Attilio, > > > At the moment usb controller modules can not be unloaded due to a > newbus locking problem, roughly... > > # kldunload ehci > syscall() > driver_module_handler() > --> newbus xlock (subr_bus.c:4127) > usb_detach() > usb_proc_mwait() <- wakeup, detach and drain the usb thread > > > [usb thread, detaching...] > usb_bus_detach() > --> newbus xlock (livelock, the kldunload process has this) > > Hans has made some changes WRT this, perforce changes 167093 and > possibly 167087. Do you want to review this or maybe go for a similar > fix? The other and me are alredy aware of such a problem. Actually, the right fix is to have attach/detach virtual functions to be called completely locklessly (in particular the detach() path). This also means a lot of work atm. This is why the newbus locking change will be backed out for 8.0-REL (just backported to 8.1 proabilly though). Attilio -- Peace can only be achieved by understanding - A. Einstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10908180614r16c86cb6q2a42f1856b6a0cc7>