Source-Changes archive

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

CVS commit: src/sys



Module Name:    src
Committed By:   dyoung
Date:           Fri Jun 26 19:30:46 UTC 2009

Modified Files:
        src/sys/kern: kern_pmf.c subr_autoconf.c
        src/sys/sys: device.h

Log Message:
Switch to kmem(9).

(void *)pew is one way to get a struct work *, but let's
write&pew->pew_work, instead.  It is more defensive and persuasive.

Make miscellaneous changes in support of tearing down arbitrary
stacks of filesystems and devices during shutdown:

1 Move struct shutdown_state, shutdown_first(), and shutdown_next(),
  from kern_pmf.c to subr_autoconf.c.  Rename detach_all() to
  config_detach_all(), and move it from kern_pmf.c to subr_autoconf.c.
  Export all of those routines.

2 In pmf_system_shutdown(), do not suspend user process scheduling, and
  do not detach all devices: I am going to do that in cpu_reboot(),
  instead.  (Soon I will do it in an MI cpu_reboot() routine.)  Do still
  call PMF shutdown hooks.

3 In config_detach(), add a DIAGNOSTIC assertion: if we're exiting
  config_detach() at the bottom, alldevs_nwrite had better not be 0,
  because config_detach() is a writer of the device list.

4 In deviter_release(), check to see if we're iterating the device list
  for reading, *first*, and if so, decrease the number of readers.  Used
  to be that if we happened to be reading during shutdown, we ran the
  shutdown branch.  Thus the number of writers reached 0, the number
  of readers remained > 0, and no writer could iterate again.  Under
  certain circumstances that would cause a hang during shutdown.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/kern/kern_pmf.c
cvs rdiff -u -r1.177 -r1.178 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.119 -r1.120 src/sys/sys/device.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index