From owner-freebsd-hackers Fri Feb 6 21:01:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA10328 for hackers-outgoing; Fri, 6 Feb 1998 21:01:55 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from sendero.simon-shapiro.org (sendero-fxp0.Simon-Shapiro.ORG [206.190.148.34]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id VAA10193 for ; Fri, 6 Feb 1998 21:01:08 -0800 (PST) (envelope-from shimon@sendero-fxp0.simon-shapiro.org) Received: (qmail 3679 invoked by uid 1000); 7 Feb 1998 05:06:31 -0000 Message-ID: X-Mailer: XFMail 1.3-alpha-012698 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <34DB650B.33590565@whistle.com> Date: Fri, 06 Feb 1998 21:06:31 -0800 (PST) Reply-To: shimon@simon-shapiro.org Organization: The Simon Shapiro Foundation From: Simon Shapiro To: Julian Elischer Subject: Re: Powering off the system/UPS Cc: hackers@FreeBSD.ORG, Mike Smith , John Fieber , "Bruce M.Walter" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" On 06-Feb-98 Julian Elischer wrote: > I'll add my input because I'm the original author of the 'at_shutdown()' > code. > > I think adding a 3rd queue is good. > adding a priority and sorting the queues before execution is > dubious because different authors may have used different > ordering constants and you will only make them THINK they know > what's going on. :) better to have them cope with possible > mis-ordering I think.. Hmmm... once the DPT code gets an at_shutdown callback, we shut down the controller. We have to be careful here and make SURE the DPT (as an example) is never called before all dirty pages are flushed. This calls for a priority. Also, consider the case of the DLM. This driver wants to perform a call as soon as a shutdown is ``planned''. It uses this as a warning/trigger to alert other systems to the shutdown and negotiate things like filesystem synchronization, RAID flushes, resource ownership transfers, hardware configuration (we swithc termination poer sourcing on SCSI busses from the shutting down system to the replacement system, so cables can be unplugged under load. The purpose of this story is to illustrate that at_shutdown registration priority can be complex and change dynamically through the life of a system. ... > I think there are few consumers of this call at the moment. > The dpt is one, but that's checked in now so you can correct that, > and we at whistle use it, (but I can cope with it) If you dig into this mechanism, maybe you keep a scenario i see sometimes but have never managed to document properly: AFTER the dpt is called from at_shutdown, the system tries to sync disks. this synchronization obviously fails. I don't think I saw this during normal shutdown, but if you shutdown from the debugger, it can happen. Simon