tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[drochner%netbsd.org@localhost: CVS commit: src/sys/kern]
Please back this changes out until the discussion of how to handle
(a) the console
(b) shutdown of devices
has been fully discussed.
Your change are bad in two different ways:
(1) It reintroduces the behaviour of letting devices active, leading to
possible corruption of system memory after reboot e.g. due to bus master
DMA. This is the same class as firmwares that have issues with
activating devices from D3. Contrary to your claims D3 is not used on
shutdown/reboot.
(2) The changes for wd/sd once again make it impossible to correctly
order dependencies. You don't want to spin down the disk before all
consumers are processed. Consider RAID.
The correct handling of console devices has to consider power management
and whether or not the device used is currently active. It also has be
extended to allow e.g. reset of the VGA console when the system is
currently under X11 in case of entering DDB. The pckbd driver had a bug
that it assumed that the keyboard is active, which is fixed. The
assumption that the ISA bridge is working at that point is very weak for
the reboot case.
The two step approach for handling other devices remains:
(1) If the device has a detach function and no remaining children, call it.
(2) If the device supports suspend, call it.
The former adresses modern devcies and should be the default. The detach
pathshould restore the device to a sane state, but most importantly make
sure that the device itself is quiet. This is very similiar to the
requirements of suspend. The latter tries to deal with devices that have
unsupported children. Hopefully it can go away soon enough.
Using shutdown hooks for disk devices is bad as it makes it impossible
to properly order e.g. write back of RAID controllers. This is not done
at the moment, but adding more dependency tracking for this is on the
list of things to do.
Joerg
----- Forwarded message from Matthias Drochner <drochner%netbsd.org@localhost>
-----
From: Matthias Drochner <drochner%netbsd.org@localhost>
Subject: CVS commit: src/sys/kern
To: source-changes%NetBSD.org@localhost
Date: Wed, 20 Feb 2008 23:30:13 +0000 (UTC)
Module Name: src
Committed By: drochner
Date: Wed Feb 20 23:30:13 UTC 2008
Modified Files:
src/sys/kern: kern_subr.c
Log Message:
Don't call pmf_system_shutdown() from doshutdownhooks() -- it does way
too much in the RB_HALT case, making the "press a key to reboot" prompt
a bad joke. doshutdownhooks() should do shutdownhooks, not more.
Since it is md code which decides about halt/poweroff etc,
pmf_system_shutdown() should be called from there if appropriate.
To generate a diff of this commit:
cvs rdiff -r1.180 -r1.181 src/sys/kern/kern_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
----- End forwarded message -----
----- Forwarded message from Matthias Drochner <drochner%netbsd.org@localhost>
-----
From: Matthias Drochner <drochner%netbsd.org@localhost>
Subject: CVS commit: src/sys/dev
To: source-changes%NetBSD.org@localhost
Date: Thu, 21 Feb 2008 21:52:06 +0000 (UTC)
Module Name: src
Committed By: drochner
Date: Thu Feb 21 21:52:06 UTC 2008
Modified Files:
src/sys/dev/ata: wd.c
src/sys/dev/scsipi: sd.c
Log Message:
put back the old shutdown handlers to flush the disk cache,
the pmf API can't deal with all the different suspend/resume/reboot
cases well yet, so better keep suspend/resume and reboot/halt/poweroff
clearly seperated
To generate a diff of this commit:
cvs rdiff -r1.355 -r1.356 src/sys/dev/ata/wd.c
cvs rdiff -r1.269 -r1.270 src/sys/dev/scsipi/sd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
----- End forwarded message -----
Home |
Main Index |
Thread Index |
Old Index