diff options
author | Matthew Ahrens <[email protected]> | 2017-03-20 18:36:00 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-03-20 18:36:00 -0700 |
commit | 64fc776208ad14b0078b89317b0f3b24338e10c1 (patch) | |
tree | b8c229ca8b052f3aa718a27b97c759a564c8fd78 /include/sys/zio.h | |
parent | a3478c074752610814f894375c3d947ece4938fe (diff) |
OpenZFS 7968 - multi-threaded spa_sync()
Reviewed by: Pavel Zakharov <[email protected]>
Reviewed by: Brad Lewis <[email protected]>
Reviewed by: Saso Kiselkov <[email protected]>
Reviewed by: Brian Behlendorf <[email protected]>
Ported-by: Matthew Ahrens <[email protected]>
spa_sync() iterates over all the dirty dnodes and processes each of them
by calling dnode_sync(). If there are many dirty dnodes (e.g. because we
created or removed a lot of files), the single thread of spa_sync()
calling dnode_sync() can become a bottleneck. Additionally, if many
dnodes are dirtied concurrently in open context (e.g. due to concurrent
file creation), the os_lock will experience lock contention via
dnode_setdirty().
The solution is to track dirty dnodes on a multilist_t, and for
spa_sync() to use separate threads to process each of the sublists in
the multilist.
OpenZFS-issue: https://www.illumos.org/issues/7968
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4a2a54c
Closes #5752
Diffstat (limited to 'include/sys/zio.h')
-rw-r--r-- | include/sys/zio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sys/zio.h b/include/sys/zio.h index 1f8708e5a..dc6c46814 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012, 2016 by Delphix. All rights reserved. + * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -454,7 +454,7 @@ struct zio { taskq_ent_t io_tqent; }; -extern int zio_timestamp_compare(const void *, const void *); +extern int zio_bookmark_compare(const void *, const void *); extern zio_t *zio_null(zio_t *pio, spa_t *spa, vdev_t *vd, zio_done_func_t *done, void *private, enum zio_flag flags); |