From owner-freebsd-current Tue May 9 19:17:57 2000 Delivered-To: freebsd-current@freebsd.org Received: from overcee.netplex.com.au (peter1.yahoo.com [208.48.107.4]) by hub.freebsd.org (Postfix) with ESMTP id A1A1937B593; Tue, 9 May 2000 19:17:42 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 42DD71CE6; Tue, 9 May 2000 19:17:41 -0700 (PDT) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: shimon@simon-shapiro.org Cc: Mike Smith , freebsd-current@FreeBSD.ORG Subject: Re: EVENTHANDLER_DECLARE In-Reply-To: Message from Simon Shapiro of "Tue, 09 May 2000 22:02:52 EDT." Date: Tue, 09 May 2000 19:17:41 -0700 From: Peter Wemm Message-Id: <20000510021741.42DD71CE6@overcee.netplex.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Simon Shapiro wrote: > > On 10-May-00 Mike Smith wrote: > >> Sorry to bother y'll, but; > >> > >> Has anyone ever used that? I see no trace of any kernel > >> code calling it, and the at_shutdown code appears to be > >> gone. > > > > It's still used in the shutdown code; it was meant to be available for > > general use elsewhere, but I haven't seen anyone playing with it, so > > maybe the design tradeoffs were bad choices. > > I dunno. It seems to do anything I need; Call me with an argument. > I do not even need the priority. Well, you need to be called at "shutdown_post_sync" - anything before that is too soon as the kernel is still potentially pushing data out to the controller. This also happens to be where the module and bus shutdown events are called too. > >> BTW, for all it is worth, any caching controller not using > >> this is guaranteed to lose data. > > > > Wrong layer. You should be using the bus shutdown method; look at eg. > > the Mylex driver to see how this is done. You should probably call your > > flush routine from the suspend method as well. > > This is dangerous for the OSM. When the i2o OSM shuts an IOP > down, it is history. It will stop doing any work at all; network, > disk, console, mouse, whatever. I reserve that for really, really > shutdown/reset. > > This needs to happen after all other shutdown work was done, > but before a physical reset is sent to the hardware. > > There is no telling how long the IOP will take to return > from flush request. That is no problem.. you can take as long as you need. The filesystems are unmounted, all the system daemons have been shut down, all dirty data has been pushed to the controller, sync(2) has happened. The system will do nothing else until your controller's shutdown method has returned. If you want to reset it after doing the flush, there is nothing stopping you - you can do it however you need to. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message