Print this page
re #13613 rb4516 Tunables needs volatile keyword

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/ip_squeue.c
          +++ new/usr/src/uts/common/inet/ip/ip_squeue.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  /*
  27   30   * IP interface to squeues.
  28   31   *
  29   32   * IP uses squeues to force serialization of packets, both incoming and
  30   33   * outgoing. Each squeue is associated with a connection instance (conn_t)
  31   34   * above, and a soft ring (if enabled) below. Each CPU will have a default
  32   35   * squeue for outbound connections, and each soft ring of an interface will
  33   36   * have an squeue to which it sends incoming packets. squeues are never
  34   37   * destroyed, and if they become unused they are kept around against future
↓ open down ↓ 105 lines elided ↑ open up ↑
 140  143  static uint_t           sqset_global_size;
 141  144  kmutex_t                sqset_lock;
 142  145  
 143  146  static void (*ip_squeue_create_callback)(squeue_t *) = NULL;
 144  147  
 145  148  /*
 146  149   * ip_squeue_worker_wait: global value for the sq_wait field for all squeues
 147  150   *      created. This is the time squeue code waits before waking up the worker
 148  151   *      thread after queuing a request.
 149  152   */
 150      -uint_t ip_squeue_worker_wait = 10;
      153 +volatile uint_t ip_squeue_worker_wait = 10;
 151  154  
 152  155  static squeue_t *ip_squeue_create(pri_t);
 153  156  static squeue_set_t *ip_squeue_set_create(processorid_t);
 154  157  static int ip_squeue_cpu_setup(cpu_setup_t, int, void *);
 155  158  static void ip_squeue_set_move(squeue_t *, squeue_set_t *);
 156  159  static void ip_squeue_set_destroy(cpu_t *);
 157  160  static void ip_squeue_clean(void *, mblk_t *, void *);
 158  161  
 159  162  #define CPU_ISON(c) (c != NULL && CPU_ACTIVE(c) && (c->cpu_flags & CPU_EXISTS))
 160  163  
↓ open down ↓ 616 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX