]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r196196:
authorattilio <attilio@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 13 Aug 2009 17:54:11 +0000 (17:54 +0000)
committerattilio <attilio@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 13 Aug 2009 17:54:11 +0000 (17:54 +0000)
commitf43d52c8d537bd913b73f0d74b60115e93cf68d6
tree44a0d5efbd4bea8cdf11f416ec8a8ed777530f1e
parent32ae7c58d0bc411116e1724173f959db18b9fce1
MFC r196196:

* Completely remove the option STOP_NMI from the kernel.  This option
  has proven to have a good effect when entering KDB by using a NMI,
  but it completely violates all the good rules about interrupts
  disabled while holding a spinlock in other occasions.  This can be the
  cause of deadlocks on events where a normal IPI_STOP is expected.
* Add an new IPI called IPI_STOP_HARD on all the supported architectures.
  This IPI is responsible for sending a stop message among CPUs using a
  privileged channel when disponible. In other cases it just does match a
  normal IPI_STOP.
  Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64
  architectures, while on the other has a normal IPI_STOP effect. It is
  responsibility of maintainers to eventually implement an hard stop
  when necessary and possible.
* Use the new IPI facility in order to implement a new userend SMP kernel
  function called stop_cpus_hard(). That is specular to stop_cpu() but
  it does use the privileged channel for the stopping facility.
* Let KDB use the newly introduced function stop_cpus_hard() and leave
  stop_cpus() for all the other cases
* Disable interrupts on CPU0 when starting the process of APs suspension.
* Style cleanup and comments adding

This patch should fix the reboot/shutdown deadlocks many users are
constantly reporting on mailing lists.

Please don't forget to update your config file with the STOP_NMI
option removal

Reviewed by:  jhb
Tested by:    pho, bz, rink
Approved by:  re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/8@196198 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
33 files changed:
UPDATING
sys/amd64/amd64/local_apic.c
sys/amd64/amd64/mp_machdep.c
sys/amd64/amd64/trap.c
sys/amd64/conf/GENERIC
sys/amd64/conf/NOTES
sys/amd64/conf/XENHVM
sys/amd64/include/apicvar.h
sys/amd64/include/smp.h
sys/conf/options.amd64
sys/conf/options.i386
sys/conf/options.pc98
sys/i386/conf/GENERIC
sys/i386/conf/NOTES
sys/i386/i386/local_apic.c
sys/i386/i386/mp_machdep.c
sys/i386/i386/trap.c
sys/i386/include/apicvar.h
sys/i386/include/smp.h
sys/i386/xen/mp_machdep.c
sys/ia64/ia64/interrupt.c
sys/ia64/include/smp.h
sys/kern/kern_shutdown.c
sys/kern/subr_kdb.c
sys/kern/subr_smp.c
sys/mips/include/smp.h
sys/mips/mips/mp_machdep.c
sys/pc98/conf/NOTES
sys/powerpc/include/smp.h
sys/powerpc/powerpc/mp_machdep.c
sys/sparc64/include/smp.h
sys/sun4v/include/smp.h
sys/sys/smp.h