From nobody Tue Jun 24 09:55:33 2025 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bRL116m4Tz5yZhZ for ; Tue, 24 Jun 2025 09:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bRL115yWZz3nYQ; Tue, 24 Jun 2025 09:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750758933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zdM6Mcj0IYccnKaEaLhIbvtNJMEqI/DFRYrEGbIbVCY=; b=GWXZkV3WvYBqZ2KM4iOXtAlzLuF3XUQw34UQkZj5VZ78D9tQAwzTzcfQ5YRBH6B+cr4ZbW 56vt5Lw7bhQZP9C1gdaXKI+e5d3c2bJitfVizQx0WeRXb0YTytXkiqquLUto+lh5Ayq2Rb GK4V+D3asprKfsb+E9mk0K3LWLhov/yiM3y/a+mAdIJRmwfqFfGM0oYNjeC4OgworfZYyI iHorLcID21qBCdNEpWxj12jrjwGHb0PTrx83b1CMRhaYkP3erXepKvRry9yRQAV/s7mNB8 bnfXAwbj3RVqMMN/MeaJVKHEjrv9OGevXsISlgwLoE0zP3CJx7wnrIsHHBypSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750758933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zdM6Mcj0IYccnKaEaLhIbvtNJMEqI/DFRYrEGbIbVCY=; b=MchTGI3E4yBjXg5XFj+v44HCAIGTjb76BAG97pG7/CK3vBIA27hxt5jF/g7wJ4kAa4rWHi TFQ5Hse+YtovDiw2+PIaoydY7I8jS4mIdYpbM8dvwJFHoVs7ENKCxyyVUURPcYDpiImSLv LjkxDvKYju2zxFaKLYudcN6w1KSqZmknFjY4nZz7ONMLaq8x01jgc0BtCetnpdcum+PTYs vR+FemOWqWTwJOT7pn9wOlK2KC0jSqF0yDUw5pAENWJdrYA0qKdgK/4FkBhxFGspIVbKon piKMv2IKvdei+dy0m0m9vfJHqboYAhJYuoq02Xbs1dRDQEyETgCBB6agZ1ma0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750758933; a=rsa-sha256; cv=none; b=Q7NdyumQwA7g4v59Ibrlpk4DzgRZuqFiUrXukcADXT3XmeleUtNkRsYw4kzbau+NyRxLzh j9oN/BqoSARbdxgC06Al+/bwsHxkCikIziYQVdYgJIvSb5cimJrEGIV22F9TrG4A6joXPl f7dQK82839c1rO4GK0hjnM7gn3uhrgZQTdMzqlH4WqFFGn4tKJ5gMDSallbkZtcwqGI+sl 8MD+EsLkEvDPD0K0PZioiliREM/WzJ3oYygU8gQpyYCpGl4fxd4qqLzVblTDzw+5hzx804 7CF899Xr/jSW3t8HAC73W0F6iZWqZbc5UEwkraf6/V1Eajv7okabDTD792/Q1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bRL1153kwzjtZ; Tue, 24 Jun 2025 09:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55O9tXIb026886; Tue, 24 Jun 2025 09:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55O9tXPK026883; Tue, 24 Jun 2025 09:55:33 GMT (envelope-from git) Date: Tue, 24 Jun 2025 09:55:33 GMT Message-Id: <202506240955.55O9tXPK026883@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Lorenzo Salvadore Subject: git: 8f8e975c79 - main - Status/2025Q2/packrat.adoc: Add report List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-doc-all@freebsd.org Sender: owner-dev-commits-doc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: salvadore X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f8e975c798a328e9b7985bce6e812c6a3193e01 Auto-Submitted: auto-generated The branch main has been updated by salvadore: URL: https://cgit.FreeBSD.org/doc/commit/?id=8f8e975c798a328e9b7985bce6e812c6a3193e01 commit 8f8e975c798a328e9b7985bce6e812c6a3193e01 Author: Rick Macklem AuthorDate: 2025-06-24 09:50:39 +0000 Commit: Lorenzo Salvadore CommitDate: 2025-06-24 09:51:49 +0000 Status/2025Q2/packrat.adoc: Add report Reviewed by: status (Pau Amma ) --- .../en/status/report-2025-04-2025-06/packrat.adoc | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/website/content/en/status/report-2025-04-2025-06/packrat.adoc b/website/content/en/status/report-2025-04-2025-06/packrat.adoc new file mode 100644 index 0000000000..7ceaaebd22 --- /dev/null +++ b/website/content/en/status/report-2025-04-2025-06/packrat.adoc @@ -0,0 +1,23 @@ +=== Packrat - NFS client caching on non-volatile storage + +Contact: Rick Macklem + +NFSv4.1/4.2 provides support for a feature called delegations. +When a NFSv4.1/4.2 client holds a delegation, the client has certain rights to a file, including a guarantee that no other client will make changes to the file unless the delegation is recalled. +As such, when a client holds a delegation for a file, it can agressively cache the file's data, knowing that it will not be modified by other clients until it returns the delegation. + +This project is intended to allow the NFSv4.1/4.2 client to agressively cache file data on client local non-volatile storage, when the client holds a delegation for the file. +I created a patch long ago to try and do this for NFSv4.0, but it was never at a stage where it was worth using. +This project is a complete rewrite of the patch, done in part because NFSv4.1/4.2 plus other recent NFSv4 related changes makes doing this more feasible. + +The patch is getting stable now, but I am not sure if it will be ready for inclusion in FreeBSD 15 as an experimental feature enabled via a new mount option called "packrat". + +The main thing I still need to do is code a writeback kernel thread. +Right now, dirty chunks stored on client local non-volatile storage get written back to the NFSv4.1/4.2 server upon umount. +This can result in the umount taking a long time (as in many minutes). +To alleviate this, I am planning on implementing a writeback kernel process that will walk the non-volatile storage and write the dirty chunks back. +The trick is to make it aggressive enough that most dirty chunks have been written back when a umount is done, but not so aggressive that it impedes the performance of synchronous NFSv4.1/4.2 RPCs. + +This will be very much an experimental feature, but it is hoped it will allow NFS mounts to be used more effectively, particularily in WAN situations, such as a mobile laptop. + +There is still work to be done, particularily with respect to recovery of delegations after a NFSv4.1/4.2 client restart.