svn commit: r223530 - head/sys/kern

Andriy Gapon avg at FreeBSD.org
Sat Jun 25 10:01:44 UTC 2011


Author: avg
Date: Sat Jun 25 10:01:43 2011
New Revision: 223530
URL: http://svn.freebsd.org/changeset/base/223530

Log:
  generic_stop_cpus: pull timeout logic from under DIAGNOSTIC
  
  ... and also increase the timeout.
  It's better to try to proceed somehow despite stuck CPUs than to hang
  indefinitely.  Especially so during shutdown and when entering kdb or panic.
  
  Timeout value is still an aribitrary value.
  Timeout diagnostic is just a printf; the work on something more
  debuggable is planned by attilio.  Need to be careful here as
  stop_cpus_hard is called very early while enetering kdb and soon(-ish)
  it may become called very early when entering panic.
  
  Reviewed by:	attilio
  MFC after:	2 months

Modified:
  head/sys/kern/subr_smp.c

Modified: head/sys/kern/subr_smp.c
==============================================================================
--- head/sys/kern/subr_smp.c	Sat Jun 25 03:43:58 2011	(r223529)
+++ head/sys/kern/subr_smp.c	Sat Jun 25 10:01:43 2011	(r223530)
@@ -236,12 +236,10 @@ generic_stop_cpus(cpuset_t map, u_int ty
 		/* spin */
 		cpu_spinwait();
 		i++;
-#ifdef DIAGNOSTIC
-		if (i == 100000) {
+		if (i == 100000000) {
 			printf("timeout stopping cpus\n");
 			break;
 		}
-#endif
 	}
 
 	stopping_cpu = NOCPU;


More information about the svn-src-all mailing list