]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/sys/dmu_tx.h
Illumos #4045 write throttle & i/o scheduler performance work
[mirror_zfs.git] / include / sys / dmu_tx.h
index 48a507e347a5172e68507d1502e648f7305673a9..f6a62af4b85b7d9c4e1912f8f557c36ed79d2229 100644 (file)
@@ -23,7 +23,7 @@
  * Use is subject to license terms.
  */
 /*
- * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2013 by Delphix. All rights reserved.
  */
 
 #ifndef        _SYS_DMU_TX_H
@@ -60,8 +60,22 @@ struct dmu_tx {
        txg_handle_t tx_txgh;
        void *tx_tempreserve_cookie;
        struct dmu_tx_hold *tx_needassign_txh;
-       list_t tx_callbacks; /* list of dmu_tx_callback_t on this dmu_tx */
-       uint8_t tx_anyobj;
+
+       /* list of dmu_tx_callback_t on this dmu_tx */
+       list_t tx_callbacks;
+
+       /* placeholder for syncing context, doesn't need specific holds */
+       boolean_t tx_anyobj;
+
+       /* has this transaction already been delayed? */
+       boolean_t tx_waited;
+
+       /* time this transaction was created */
+       hrtime_t tx_start;
+
+       /* need to wait for sufficient dirty space */
+       boolean_t tx_wait_dirty;
+
        int tx_err;
 #ifdef DEBUG_DMU_TX
        uint64_t tx_space_towrite;
@@ -121,7 +135,8 @@ typedef struct dmu_tx_stats {
        kstat_named_t dmu_tx_memory_reclaim;
        kstat_named_t dmu_tx_memory_inflight;
        kstat_named_t dmu_tx_dirty_throttle;
-       kstat_named_t dmu_tx_write_limit;
+       kstat_named_t dmu_tx_dirty_delay;
+       kstat_named_t dmu_tx_dirty_over_max;
        kstat_named_t dmu_tx_quota;
 } dmu_tx_stats_t;