Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Feb 1998 21:06:31 -0800 (PST)
From:      Simon Shapiro <shimon@simon-shapiro.org>
To:        Julian Elischer <julian@whistle.com>
Cc:        hackers@FreeBSD.ORG, Mike Smith <mike@smith.net.au>, John Fieber <jfieber@indiana.edu>, "Bruce M.Walter" <walter@fortean.com>
Subject:   Re: Powering off the system/UPS
Message-ID:  <XFMail.980206210631.shimon@simon-shapiro.org>
In-Reply-To: <34DB650B.33590565@whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.980206210631.shimon>