Print this page
NEX-17501 Enable parallel crash dump
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4/os/startup.c
          +++ new/usr/src/uts/sun4/os/startup.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  24   25   * Copyright (c) 2016 by Delphix. All rights reserved.
  25   26   */
  26   27  
  27   28  #include <sys/machsystm.h>
  28   29  #include <sys/archsystm.h>
  29   30  #include <sys/vm.h>
  30   31  #include <sys/cpu.h>
  31   32  #include <sys/atomic.h>
  32   33  #include <sys/reboot.h>
  33   34  #include <sys/kdi.h>
↓ open down ↓ 77 lines elided ↑ open up ↑
 111  112  /*
 112  113   * XXX - Don't port this to new architectures
 113  114   * A 3rd party volume manager driver (vxdm) depends on the symbol romp.
 114  115   * 'romp' has no use with a prom with an IEEE 1275 client interface.
 115  116   * The driver doesn't use the value, but it depends on the symbol.
 116  117   */
 117  118  void *romp;             /* veritas driver won't load without romp 4154976 */
 118  119  /*
 119  120   * Declare these as initialized data so we can patch them.
 120  121   */
 121      -pgcnt_t physmem = 0;    /* memory size in pages, patch if you want less */
 122      -pgcnt_t segkpsize =
      122 +volatile pgcnt_t physmem = 0; /* memory size in pages, patch if you want less */
      123 +volatile pgcnt_t segkpsize =
 123  124      btop(SEGKPDEFSIZE); /* size of segkp segment in pages */
 124      -uint_t segmap_percent = 6; /* Size of segmap segment */
      125 +volatile uint_t segmap_percent = 6; /* Size of segmap segment */
 125  126  
 126  127  int use_cache = 1;              /* cache not reliable (605 bugs) with MP */
 127  128  int vac_copyback = 1;
 128  129  char *cache_mode = NULL;
 129  130  int use_mix = 1;
 130  131  int prom_debug = 0;
 131  132  
 132  133  caddr_t boot_tba;               /* %tba at boot - used by kmdb */
 133  134  uint_t  tba_taken_over = 0;
 134  135  
↓ open down ↓ 488 lines elided ↑ open up ↑
 623  624                  if ((i != CPU->cpu_id) && CPU_XCALL_READY(i)) {
 624  625                          cpu[i]->cpu_flags &= ~CPU_READY;
 625  626                          cpu[i]->cpu_flags |= CPU_QUIESCED;
 626  627                          CPUSET_DEL(cpu_ready_set, cpu[i]->cpu_id);
 627  628                  }
 628  629          }
 629  630  
 630  631          /*
 631  632           * Force a serial dump, since there are no CPUs to help.
 632  633           */
 633      -        dump_plat_mincpu = 0;
      634 +        dump_ncpu_low = 0;
 634  635  
 635  636          /*
 636  637           * We've managed to get here without going through the
 637  638           * normal panic code path. Try and save some useful
 638  639           * information.
 639  640           */
 640  641          if (!panicstr && (curthread->t_panic_trap == NULL)) {
 641  642                  ti.trap_type = sync_tt;
 642  643                  ti.trap_regs = &sync_reg_buf;
 643  644                  ti.trap_addr = NULL;
↓ open down ↓ 1787 lines elided ↑ open up ↑
2431 2432  
2432 2433  /*
2433 2434   * Add to a memory list.
2434 2435   * start = start of new memory segment
2435 2436   * len = length of new memory segment in bytes
2436 2437   * memlistp = pointer to array of available memory segment structures
2437 2438   * curmemlistp = memory list to which to add segment.
2438 2439   */
2439 2440  static void
2440 2441  memlist_add(uint64_t start, uint64_t len, struct memlist **memlistp,
2441      -        struct memlist **curmemlistp)
     2442 +    struct memlist **curmemlistp)
2442 2443  {
2443 2444          struct memlist *new = *memlistp;
2444 2445  
2445 2446          memlist_new(start, len, memlistp);
2446 2447          memlist_insert(new, curmemlistp);
2447 2448  }
2448 2449  
2449 2450  static int
2450 2451  ndata_alloc_memseg(struct memlist *ndata, size_t avail)
2451 2452  {
↓ open down ↓ 859 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX