diff options
author | Dave Plauger <Dave.Plauger@Sun.COM> | 2010-08-18 15:20:51 -0400 |
---|---|---|
committer | Dave Plauger <Dave.Plauger@Sun.COM> | 2010-08-18 15:20:51 -0400 |
commit | 9c84d1a2175e2014ca1b86b8d0bfff21de3a00e4 (patch) | |
tree | 036232dbcfdcd4f4139c692079e44de7fc7e4d17 /usr/src/uts/common | |
parent | 163eb7ff0acf105df4a6afcbbd919a066afe4a1b (diff) | |
download | illumos-gate-9c84d1a2175e2014ca1b86b8d0bfff21de3a00e4.tar.gz |
6976415 Console commands "reset panic" + sync cause panic dump timeout on M4000 and M5000
Diffstat (limited to 'usr/src/uts/common')
-rw-r--r-- | usr/src/uts/common/os/dumpsubr.c | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/usr/src/uts/common/os/dumpsubr.c b/usr/src/uts/common/os/dumpsubr.c index 0ae9c3d390..a8a36633e7 100644 --- a/usr/src/uts/common/os/dumpsubr.c +++ b/usr/src/uts/common/os/dumpsubr.c @@ -412,7 +412,6 @@ typedef struct dumpcfg { char *maxvm; /* reserved VM for spare pages */ lock_t helper_lock; /* protect helper state */ char helpers_wanted; /* flag to enable parallelism */ - char helper_present; /* at least one helper showed up */ } dumpcfg_t; static dumpcfg_t dumpcfg; /* config vars */ @@ -883,15 +882,10 @@ dumpsys_get_maxmem() int k; /* - * Fall back to doing a serial dump if no helpers showed - * up. It is possible for other CPUs to be stuck in PROM, or - * DRd out. panic("sync initiated") in sync_handler() is one - * case. A parallel dump will hang (dump time out) unless - * there is at least one helper CPU. At this point dumpsys() - * has done some I/O, which means there has been plenty of - * time for helpers to arrive. + * Setting dump_plat_mincpu to 0 at any time forces a serial + * dump. */ - if (!cfg->helper_present) { + if (dump_plat_mincpu == 0) { cfg->clevel = 0; return; } @@ -2189,8 +2183,6 @@ dumpsys_lzjbcompress(helper_t *hp) void dumpsys_helper() { - if (!dumpcfg.helper_present) - dumpcfg.helper_present = 1; dumpsys_spinlock(&dumpcfg.helper_lock); if (dumpcfg.helpers_wanted) { helper_t *hp, *hpend = &dumpcfg.helper[dumpcfg.nhelper]; @@ -2229,8 +2221,6 @@ dumpsys_helper() void dumpsys_helper_nw() { - if (!dumpcfg.helper_present) - dumpcfg.helper_present = 1; if (dumpcfg.helpers_wanted) dumpsys_helper(); } @@ -2295,7 +2285,29 @@ dumpsys_main_task(void *arg) cbuf_t *cp; pgcnt_t baseoff, pfnoff; pfn_t base, pfn; - int sec; + int sec, i, dumpserial; + + /* + * Fall back to serial mode if there are no helpers. + * dump_plat_mincpu can be set to 0 at any time. + * dumpcfg.helpermap must contain at least one member. + */ + dumpserial = 1; + + if (dump_plat_mincpu != 0 && dumpcfg.clevel != 0) { + for (i = 0; i < BT_BITOUL(NCPU); ++i) { + if (dumpcfg.helpermap[i] != 0) { + dumpserial = 0; + break; + } + } + } + + if (dumpserial) { + dumpcfg.clevel = 0; + if (dumpcfg.helper[0].lzbuf == NULL) + dumpcfg.helper[0].lzbuf = dumpcfg.helper[1].page; + } dump_init_memlist_walker(&mlw); @@ -2430,7 +2442,7 @@ dumpsys_main_task(void *arg) * If there are no helpers the main task does * non-streams lzjb compress. */ - if (dumpcfg.clevel == 0) { + if (dumpserial) { dumpsys_lzjb_page(dumpcfg.helper, cp); break; } |