Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/bio.c
          +++ new/usr/src/uts/common/os/bio.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   * Copyright 2011 Joyent, Inc.  All rights reserved.
  25   25   */
       26 +/*
       27 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       28 + */
  26   29  
  27   30  /*
  28   31   * Copyright (c) 2016 by Delphix. All rights reserved.
  29   32   */
  30   33  
  31   34  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  32   35  /*        All Rights Reserved   */
  33   36  
  34   37  /*
  35   38   * University Copyright- Copyright (c) 1982, 1986, 1988
↓ open down ↓ 118 lines elided ↑ open up ↑
 154  157  #define BIO_BHDR_POOL   100             /* Default bhdr pool size */
 155  158  #define BIO_MIN_HDR     10              /* Minimum number of buffer headers */
 156  159  #define BIO_MIN_HWM     (BIO_MIN_HDR * MAXBSIZE / 1024)
 157  160  #define BIO_HASHLEN     4               /* Target length of hash chains */
 158  161  
 159  162  
 160  163  /* Flags for bio_recycle() */
 161  164  #define BIO_HEADER      0x01
 162  165  #define BIO_MEM         0x02
 163  166  
 164      -extern  int bufhwm;             /* User tunable - high water mark for mem  */
 165      -extern  int bufhwm_pct;         /* ditto - given in % of physmem  */
      167 +extern volatile int bufhwm;     /* User tunable - high water mark for mem  */
      168 +extern volatile int bufhwm_pct; /* ditto - given in % of physmem  */
 166  169  
 167  170  /*
 168  171   * The following routines allocate and free
 169  172   * buffers with various side effects.  In general the
 170  173   * arguments to an allocate routine are a device and
 171  174   * a block number, and the value is a pointer to
 172  175   * to the buffer header; the buffer returned is locked with a
 173  176   * binary semaphore so that no one else can touch it. If the block was
 174  177   * already in core, no I/O need be done; if it is
 175  178   * already locked, the process waits until it becomes free.
↓ open down ↓ 1919 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX