summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDon Brady <[email protected]>2017-09-26 19:45:19 -0600
committerBrian Behlendorf <[email protected]>2018-07-30 11:30:41 -0700
commitdae3e9ea21a73b1ca940abd4aee1993ea4be8028 (patch)
treea7d9398eac1e73fdf13ae8c73fc77c051894d086 /include
parent6b64382b17ea420b1265237ab52657a2d0a94824 (diff)
OpenZFS 9465 - ARC check for 'anon_size > arc_c/2' can stall the system
In the case of one pool being built on another pool, we want to make sure we don't end up throttling the lower (backing) pool when the upper pool is the majority contributor to dirty data. To insure we make forward progress during throttling, we also check the current pool's net dirty data and only throttle if it exceeds zfs_arc_pool_dirty_percent of the anonymous dirty data in the cache. Authored by: Don Brady <[email protected]> Reviewed by: Sebastien Roy <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Prashanth Sreenivasa <[email protected]> Approved by: Robert Mustacchi <[email protected]> Ported-by: Brian Behlendorf <[email protected]> Porting Notes: * The new global variables zfs_arc_dirty_limit_percent, zfs_arc_anon_limit_percent, and zfs_arc_pool_dirty_percent were intentially not added as tunable module parameters. OpenZFS-issue: https://illumos.org/issues/9465 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/d6a4c3ef Closes #7749
Diffstat (limited to 'include')
-rw-r--r--include/sys/arc.h2
-rw-r--r--include/sys/spa.h1
-rw-r--r--include/sys/spa_impl.h5
3 files changed, 7 insertions, 1 deletions
diff --git a/include/sys/arc.h b/include/sys/arc.h
index 9d6bab505..a5bdefb56 100644
--- a/include/sys/arc.h
+++ b/include/sys/arc.h
@@ -289,7 +289,7 @@ void arc_freed(spa_t *spa, const blkptr_t *bp);
void arc_flush(spa_t *spa, boolean_t retry);
void arc_tempreserve_clear(uint64_t reserve);
-int arc_tempreserve_space(uint64_t reserve, uint64_t txg);
+int arc_tempreserve_space(spa_t *spa, uint64_t reserve, uint64_t txg);
uint64_t arc_target_bytes(void);
void arc_init(void);
diff --git a/include/sys/spa.h b/include/sys/spa.h
index 4a3fc71f7..82fe2c18c 100644
--- a/include/sys/spa.h
+++ b/include/sys/spa.h
@@ -990,6 +990,7 @@ extern uint64_t spa_delegation(spa_t *spa);
extern objset_t *spa_meta_objset(spa_t *spa);
extern uint64_t spa_deadman_synctime(spa_t *spa);
extern uint64_t spa_deadman_ziotime(spa_t *spa);
+extern uint64_t spa_dirty_data(spa_t *spa);
/* Miscellaneous support routines */
extern void spa_load_failed(spa_t *spa, const char *fmt, ...);
diff --git a/include/sys/spa_impl.h b/include/sys/spa_impl.h
index 8d2a31961..8d2a20dbb 100644
--- a/include/sys/spa_impl.h
+++ b/include/sys/spa_impl.h
@@ -363,6 +363,11 @@ struct spa {
uint64_t spa_errata; /* errata issues detected */
spa_stats_t spa_stats; /* assorted spa statistics */
spa_keystore_t spa_keystore; /* loaded crypto keys */
+
+ /* arc_memory_throttle() parameters during low memory condition */
+ uint64_t spa_lowmem_page_load; /* memory load during txg */
+ uint64_t spa_lowmem_last_txg; /* txg window start */
+
hrtime_t spa_ccw_fail_time; /* Conf cache write fail time */
taskq_t *spa_zvol_taskq; /* Taskq for minor management */
taskq_t *spa_prefetch_taskq; /* Taskq for prefetch threads */