Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2004 14:00:16 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        freebsd-stable@freebsd.org
Subject:   Shutdown/halt operation ordering
Message-ID:  <20040226030016.GT10121@gsmx07.alcatel.com.au>

next in thread | raw e-mail | index | archive | help
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



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