Print this page
4045 zfs write throttle & i/o scheduler performance work
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/txg_impl.h
          +++ new/usr/src/uts/common/fs/zfs/sys/txg_impl.h
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  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   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   24   * Use is subject to license terms.
  24   25   */
  25   26  
  26   27  /*
  27   28   * Copyright (c) 2013 by Delphix. All rights reserved.
  28   29   */
  29   30  
  30   31  #ifndef _SYS_TXG_IMPL_H
↓ open down ↓ 51 lines elided ↑ open up ↑
  82   83   * an array of tx_cpu structures (described above). Although the tx_sync_lock
  83   84   * is used to protect the members of this structure, it is not used to
  84   85   * protect the tx_open_txg. Instead a special lock in the tx_cpu structure
  85   86   * is used. Readers of tx_open_txg must grab the per-cpu tc_open_lock.
  86   87   * Any thread wishing to update tx_open_txg must grab the tc_open_lock on
  87   88   * every cpu (see txg_quiesce()).
  88   89   */
  89   90  typedef struct tx_state {
  90   91          tx_cpu_t        *tx_cpu;        /* protects access to tx_open_txg */
  91   92          kmutex_t        tx_sync_lock;   /* protects the rest of this struct */
       93 +
  92   94          uint64_t        tx_open_txg;    /* currently open txg id */
  93   95          uint64_t        tx_quiesced_txg; /* quiesced txg waiting for sync */
  94   96          uint64_t        tx_syncing_txg; /* currently syncing txg id */
  95   97          uint64_t        tx_synced_txg;  /* last synced txg id */
  96   98  
       99 +        hrtime_t        tx_open_time;   /* start time of tx_open_txg */
      100 +
  97  101          uint64_t        tx_sync_txg_waiting; /* txg we're waiting to sync */
  98  102          uint64_t        tx_quiesce_txg_waiting; /* txg we're waiting to open */
  99  103  
 100  104          kcondvar_t      tx_sync_more_cv;
 101  105          kcondvar_t      tx_sync_done_cv;
 102  106          kcondvar_t      tx_quiesce_more_cv;
 103  107          kcondvar_t      tx_quiesce_done_cv;
 104  108          kcondvar_t      tx_timeout_cv;
 105  109          kcondvar_t      tx_exit_cv;     /* wait for all threads to exit */
 106  110  
↓ open down ↓ 14 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX