summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-10-20 22:13:50 +0000
committerdelphij <delphij@FreeBSD.org>2014-10-20 22:13:50 +0000
commite02ec23db84d6d93e4098d5400208c6bc8ae5b56 (patch)
tree20adbecfb3b2f6adc464c5f8a7fa88c89ffd5e60 /cddl
parent6bc23f0b46eecfc3f1b2eec9b0f02644aa2b8f8d (diff)
downloadFreeBSD-src-e02ec23db84d6d93e4098d5400208c6bc8ae5b56.zip
FreeBSD-src-e02ec23db84d6d93e4098d5400208c6bc8ae5b56.tar.gz
MFC r272598: MFV r272585:
Split the godfather zio into CPU number's to reduce lock contention. Illumos issue: 5176 lock contention on godfather zio
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/zdb/zdb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
index 04970fc..f7cacaa 100644
--- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c
+++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
@@ -2594,10 +2594,12 @@ dump_block_stats(spa_t *spa)
* all async I/Os to complete.
*/
if (dump_opt['c']) {
- (void) zio_wait(spa->spa_async_zio_root);
- spa->spa_async_zio_root = zio_root(spa, NULL, NULL,
- ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE |
- ZIO_FLAG_GODFATHER);
+ for (int i = 0; i < max_ncpus; i++) {
+ (void) zio_wait(spa->spa_async_zio_root[i]);
+ spa->spa_async_zio_root[i] = zio_root(spa, NULL, NULL,
+ ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE |
+ ZIO_FLAG_GODFATHER);
+ }
}
if (zcb.zcb_haderrors) {
OpenPOWER on IntegriCloud