From owner-freebsd-stable@FreeBSD.ORG Wed Feb 25 19:00:27 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B5F2716A4CE for ; Wed, 25 Feb 2004 19:00:27 -0800 (PST) Received: from alcanet.com.au (mail2.alcanet.com.au [203.62.196.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE31843D2F for ; Wed, 25 Feb 2004 19:00:24 -0800 (PST) (envelope-from peter.jeremy@alcatel.com.au) Received: from sydsmtp02.alcatel.com.au (IDENT:root@localhost.localdomain [127.0.0.1])i1Q30HMw030622 for ; Thu, 26 Feb 2004 14:00:18 +1100 Received: from gsmx07.alcatel.com.au ([139.188.20.247]) by sydsmtp02.alcatel.com.au (Lotus Domino Release 5.0.12) with ESMTP id 2004022614001747:190856 ; Thu, 26 Feb 2004 14:00:17 +1100 Received: from gsmx07.alcatel.com.au (localhost [127.0.0.1]) i1Q30HHQ066779 for ; Thu, 26 Feb 2004 14:00:17 +1100 (EST) (envelope-from peter.jeremy@alcatel.com.au) Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.12.9p2/8.12.9/Submit) id i1Q30GVX066778 for freebsd-stable@freebsd.org; Thu, 26 Feb 2004 14:00:16 +1100 (EST) (envelope-from peter.jeremy@alcatel.com.au) Date: Thu, 26 Feb 2004 14:00:16 +1100 From: Peter Jeremy To: freebsd-stable@freebsd.org Message-ID: <20040226030016.GT10121@gsmx07.alcatel.com.au> Mail-Followup-To: freebsd-stable@freebsd.org Mime-Version: 1.0 User-Agent: Mutt/1.4.2i X-MIMETrack: Itemize by SMTP Server on SYDSMTP02/AlcatelAustralia(Release 5.0.12 |February 13, 2003) at 26/02/2004 02:00:17 PM,|February 13, 2003) at 26/02/2004 02:00:18 PM, Serialize complete at 26/02/2004 02:00:18 PM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Shutdown/halt operation ordering X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2004 03:00:27 -0000 The low-level shutdown handling (in kern/kern_shutdown.c:boot()) does things in the following order: - shutdown_pre_sync events - sync disks (unless RB_NOSYNC) - shutdown_post_sync events - crashdump (if RB_DUMP) - shutdown_final events (which includes the final halt/reboot/...) shutdown_post_sync includes invoking the shutdown handler on all devices. Can someone please explain why this is invoked before dumpsys(), rather than after it? It would seem reasonable to want to do things like flush disk caches after the crashdump, rather than before. Also, this shutdown processing may disturb state information that is relevant to the problem that made the system panic. What is the impact of moving EVENTHANDLER_INVOKE(shutdown_post_sync, howto); to after the dumpsys() call? -- Peter Jeremy