Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/disp/disp.c
          +++ new/usr/src/uts/common/disp/disp.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  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   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
       25 +/*
       26 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       27 + */
  25   28  
  26   29  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  27   30  /*        All Rights Reserved   */
  28   31  
  29   32  
  30   33  #include <sys/types.h>
  31   34  #include <sys/param.h>
  32   35  #include <sys/sysmacros.h>
  33   36  #include <sys/signal.h>
  34   37  #include <sys/user.h>
↓ open down ↓ 78 lines elided ↑ open up ↑
 113  116  extern void unset_idle_cpu(int cpun);
 114  117  static void setkpdq(kthread_t *tp, int borf);
 115  118  #define SETKP_BACK      0
 116  119  #define SETKP_FRONT     1
 117  120  /*
 118  121   * Parameter that determines how recently a thread must have run
 119  122   * on the CPU to be considered loosely-bound to that CPU to reduce
 120  123   * cold cache effects.  The interval is in hertz.
 121  124   */
 122  125  #define RECHOOSE_INTERVAL 3
 123      -int     rechoose_interval = RECHOOSE_INTERVAL;
      126 +volatile int    rechoose_interval = RECHOOSE_INTERVAL;
 124  127  
 125  128  /*
 126  129   * Parameter that determines how long (in nanoseconds) a thread must
 127  130   * be sitting on a run queue before it can be stolen by another CPU
 128  131   * to reduce migrations.  The interval is in nanoseconds.
 129  132   *
 130  133   * The nosteal_nsec should be set by platform code cmp_set_nosteal_interval()
 131  134   * to an appropriate value.  nosteal_nsec is set to NOSTEAL_UNINITIALIZED
 132  135   * here indicating it is uninitiallized.
 133  136   * Setting nosteal_nsec to 0 effectively disables the nosteal 'protection'.
↓ open down ↓ 2568 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX