Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/external/cddl/osnet/dist/uts/common/fs/zfs Pull up follow...
details: https://anonhg.NetBSD.org/src/rev/249ca67a515e
branches: netbsd-9
changeset: 963695:249ca67a515e
user: martin <martin%NetBSD.org@localhost>
date: Mon Mar 09 09:52:00 2020 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #769):
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.63
Avoid unnecessary zil_commit on rm.
1. Issue zil_commit only if we're actually updating something --
there's no need to commit if we're unlinking the file or if
there's no atime update being applied.
2. Issue zil_commit only if the zfs has sync=always set -- for
sync=standard there's no need for us to commit anything here since
no application asked for an explicit sync.
Speeds up untarring base.tgz on top of itself by a factor of about
2x, and speeds up rm by a factor of about 10x, on my system with an
SSD SLOG over SATA. Histogram of unlink, rmdir, and rename timing
shows dramatic reduction in latency for most samples.
(To be fair, this was not an improvement over zfs; issuing the
unnecessary zil_commit was a self-inflicted performance wound.)
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (18 lines):
diff -r 79ed217e79e1 -r 249ca67a515e external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Mon Mar 09 05:37:37 2020 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Mon Mar 09 09:52:00 2020 +0000
@@ -5836,10 +5836,10 @@
zp->z_atime_dirty = 0;
dmu_tx_commit(tx);
}
- }
-
- if (zfsvfs->z_log)
- zil_commit(zfsvfs->z_log, zp->z_id);
+
+ if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
+ zil_commit(zfsvfs->z_log, zp->z_id);
+ }
if (zp->z_sa_hdl == NULL)
zfs_znode_free(zp);
Home |
Main Index |
Thread Index |
Old Index