Mercurial > illumos > illumos-gate
changeset 12640:b4f09d1fd79d
6923763 break followed by sync results in panic dump timeout 'dump aborted'
author | Dave Plauger <Dave.Plauger@Sun.COM> |
---|---|
date | Thu, 17 Jun 2010 10:26:59 -0400 |
parents | 884a64bb4385 |
children | 0d09c6ce3fde |
files | usr/src/uts/common/os/dumpsubr.c usr/src/uts/common/sys/dumphdr.h usr/src/uts/sun4/os/mp_states.c |
diffstat | 3 files changed, 32 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/os/dumpsubr.c Wed Jun 16 22:08:14 2010 -0700 +++ b/usr/src/uts/common/os/dumpsubr.c Thu Jun 17 10:26:59 2010 -0400 @@ -2098,6 +2098,13 @@ * panic dump the helper CPUs communicate with the panic CPU using * memory variables. All memory mapping and I/O is performed by the * panic CPU. + * + * At dump configuration time, helper_lock is set and helpers_wanted + * is 0. dumpsys() decides whether to set helpers_wanted before + * clearing helper_lock. + * + * At panic time, idle CPUs spin-wait on helper_lock, then alternately + * take the lock and become a helper, or return. */ void dumpsys_helper() @@ -2122,11 +2129,29 @@ return; } } + + /* No more helpers are needed. */ + dumpcfg.helpers_wanted = 0; + } dumpsys_spinunlock(&dumpcfg.helper_lock); } /* + * No-wait helper callable in spin loops. + * + * Do not wait for helper_lock. Just check helpers_wanted. The caller + * may decide to continue. This is the "c)ontinue, s)ync, r)eset? s" + * case. + */ +void +dumpsys_helper_nw() +{ + if (dumpcfg.helpers_wanted) + dumpsys_helper(); +} + +/* * Dump helper for live dumps. * These run as a system task. */
--- a/usr/src/uts/common/sys/dumphdr.h Wed Jun 16 22:08:14 2010 -0700 +++ b/usr/src/uts/common/sys/dumphdr.h Thu Jun 17 10:26:59 2010 -0400 @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _SYS_DUMPHDR_H @@ -183,6 +182,7 @@ extern void dump_addpage(struct as *, void *, pfn_t); extern void dumpsys(void); extern void dumpsys_helper(void); +extern void dumpsys_helper_nw(void); extern void dump_messages(void); extern void dump_ereports(void); extern void dumpvp_write(const void *, size_t);
--- a/usr/src/uts/sun4/os/mp_states.c Wed Jun 16 22:08:14 2010 -0700 +++ b/usr/src/uts/sun4/os/mp_states.c Thu Jun 17 10:26:59 2010 -0400 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,9 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/systm.h> #include <sys/membar.h> #include <sys/machsystm.h> @@ -34,6 +30,7 @@ #include <sys/cpuvar.h> #include <sys/cpu_module.h> #include <sys/cmp.h> +#include <sys/dumphdr.h> #include <sys/cpu_sgnblk_defs.h> @@ -75,7 +72,7 @@ kern_idle[CPU->cpu_id] = 1; while (kern_idle[CPU->cpu_id]) - /* SPIN */; + dumpsys_helper_nw(); CPU->cpu_m.in_prom = 0; membar_stld();