Date: Sat, 25 Jun 2011 10:01:43 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r223530 - head/sys/kern Message-ID: <201106251001.p5PA1hcK092969@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106251001.p5PA1hcK092969>