tech-kern archive

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

Re: CVS commit: src/sys/kern

On Thu, Feb 21, 2008 at 12:36:33PM +0100, Matthias Drochner wrote:
> said:
> > > Modified Files:
> > >   src/sys/kern: kern_subr.c
> > > Don't call pmf_system_shutdown() from doshutdownhooks()
> > Please, come discuss this with us on tech-kern. 
> OK, let me tell some of reasons why calling the suspend
> code in mi shutdown is wrong:

I happen to agree that suspending devices at shutdown is wrong.  Joerg and
I had some productive discussions on the topic over on tech-kern@, and I
have been testing code in the mean time that detaches devices at shutdown,
instead of suspending them.

BTW, I interpret driver detachment as "OS restores device to initial
(i.e., boot) conditions and relinquishes device," and I believe that
interpretation suits all of the purposes that people have mentioned on
this thread, especially,

        * avoid "emergency shutdown" of hard disk drives
        * restore h/w to a state where the BIOS can deal with it

Finally, if the active console device does not detach, but returns EBUSY,
then the console and all of its ancestors in the device tree will remain
attached, which satisfies the purpose that

        * the console remains active for 'press any key to reboot'


David Young             OJC Technologies      Urbana, IL * (217) 278-3933 ext 24

Home | Main Index | Thread Index | Old Index