Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



On Thu, Jan 17, 2008 at 09:07:18PM -0500, Jared D. McNeill wrote:
> On Thu, 17 Jan 2008, David Young wrote:
> >NetBSD has run the pre-PMF shutdown hooks after panic for years.  I have
> >not heard anyone complaining about them.  Is there a particular bug you
> >fix by skipping them at panic?
> >
> >The call to pmf_system_shutdown() is new.  If it causes problems after
> >a panic, I believe that this conservative change is more appropriate:
> >check for panic and quit after running the "legacy" shutdown hooks,
> >but before running pmf_system_shutdown().
> 
> The call to doshutdownhooks needs to go away, it breaks the ordering 
> requirements of PMF. Consider the following: doshutdownhooks powers off 
> fooide0, then pmf_system_shutdown attempts to halt wd0 at fooide0. You're 
> probably hosed at this point.

I agree that the legacy shutdown hooks should go away, but it is not
clear to me that PMF device suspension is a suitable replacement for a
shutdown hook in every instance.

In my own source tree, pmf_system_shutdown() calls config_detach() on
every device, starting with the leaves of the device tree and moving
upward.  Then pmf_system_shutdown() walk the tree again, as it does now,
suspending all of those devices that I could not detach.  This gives me
the opportunity to distinguish shutdown from suspension.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933 ext 24



Home | Main Index | Thread Index | Old Index