diff options
author | Alex Reece <[email protected]> | 2014-07-18 07:08:31 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-09-23 13:50:55 -0700 |
commit | acbad6ff6768b0ccfb3c319e981ec211dcecc277 (patch) | |
tree | 3a17414f6a30247ce3dcc0488da07e7905e8894a /module/zfs/txg.c | |
parent | 1f6f97f3049706aa7ca95636fd587ae5f3d531a9 (diff) |
Illumos 4753 - increase number of outstanding async writes when sync task is waiting
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Adam Leventhal <[email protected]>
Reviewed by: Christopher Siden <[email protected]>
Reviewed by: Dan McDonald <[email protected]>
Approved by: Garrett D'Amore <[email protected]>
References:
https://www.illumos.org/issues/4753
https://github.com/illumos/illumos-gate/commit/73527f4
Comments by Matt Ahrens from the issue tracker:
When a sync task is waiting for a txg to complete, we should hurry
it along by increasing the number of outstanding async writes
(i.e. make vdev_queue_max_async_writes() return a larger number).
Initially we might just have a tunable for "minimum async writes
while a synctask is waiting" and set it to 3.
Ported-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2716
Diffstat (limited to 'module/zfs/txg.c')
-rw-r--r-- | module/zfs/txg.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/module/zfs/txg.c b/module/zfs/txg.c index a39732bb9..a10261846 100644 --- a/module/zfs/txg.c +++ b/module/zfs/txg.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ #include <sys/zfs_context.h> @@ -787,6 +787,26 @@ txg_list_empty(txg_list_t *tl, uint64_t txg) } /* + * Returns true if all txg lists are empty. + * + * Warning: this is inherently racy (an item could be added immediately + * after this function returns). We don't bother with the lock because + * it wouldn't change the semantics. + */ +boolean_t +txg_all_lists_empty(txg_list_t *tl) +{ + int i; + + for (i = 0; i < TXG_SIZE; i++) { + if (!txg_list_empty(tl, i)) { + return (B_FALSE); + } + } + return (B_TRUE); +} + +/* * Add an entry to the list (unless it's already on the list). * Returns B_TRUE if it was actually added. */ |