Received: by mail.netbsd.org (Postfix, from userid 605) id E38D084E33; Mon, 9 Mar 2020 09:52:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 6658884E32 for ; Mon, 9 Mar 2020 09:52:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id EHbt3Rj0Mqfb for ; Mon, 9 Mar 2020 09:52:01 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id EC3CB84E30 for ; Mon, 9 Mar 2020 09:52:00 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id DF95EFB27; Mon, 9 Mar 2020 09:52:00 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Mon, 9 Mar 2020 09:52:00 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-9] src/external/cddl/osnet/dist/uts/common/fs/zfs To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200309095200.DF95EFB27@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Martin Husemann" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: martin Date: Mon Mar 9 09:52:00 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs [netbsd-9]: zfs_vnops.c Log Message: 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.) To generate a diff of this commit: cvs rdiff -u -r1.50.2.6 -r1.50.2.7 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.