# HG changeset patch # User Dave Plauger # Date 1276784819 14400 # Node ID b4f09d1fd79d010407a83fd03ca614aac431dcb5 # Parent 884a64bb4385d66b3737075a83650a49b8d5c786 6923763 break followed by sync results in panic dump timeout 'dump aborted' diff -r 884a64bb4385 -r b4f09d1fd79d usr/src/uts/common/os/dumpsubr.c --- 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. */ diff -r 884a64bb4385 -r b4f09d1fd79d usr/src/uts/common/sys/dumphdr.h --- 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); diff -r 884a64bb4385 -r b4f09d1fd79d usr/src/uts/sun4/os/mp_states.c --- 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 #include #include @@ -34,6 +30,7 @@ #include #include #include +#include #include @@ -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();