mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Illumos 4753 - increase number of outstanding async writes when sync task is waiting
Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Garrett D'Amore <garrett@damore.org> 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 <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2716
This commit is contained in:
committed by
Brian Behlendorf
parent
1f6f97f304
commit
acbad6ff67
+21
-1
@@ -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>
|
||||
@@ -786,6 +786,26 @@ txg_list_empty(txg_list_t *tl, uint64_t txg)
|
||||
return (tl->tl_head[txg & TXG_MASK] == NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user