From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, kdevops@lists.linux.dev
Subject: Re: [PATCH] Make the build-in NFSD server's lease time adjustable
Date: Mon, 05 Feb 2024 06:07:21 -0500 [thread overview]
Message-ID: <7f190e06bf8aa0749a65e3ff781e58c1001a6322.camel@kernel.org> (raw)
In-Reply-To: <170681547805.756494.481923754110817484.stgit@renoir.1015granger.net>
On Thu, 2024-02-01 at 14:24 -0500, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> Reducing the NFSv4 lease time can help some workflows complete
> faster.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> kconfigs/Kconfig.nfsd | 10 ++++++++++
> playbooks/roles/nfsd/defaults/main.yml | 1 +
> playbooks/roles/nfsd/templates/nfs.conf.j2 | 2 ++
> scripts/nfsd.Makefile | 1 +
> 4 files changed, 14 insertions(+)
>
> diff --git a/kconfigs/Kconfig.nfsd b/kconfigs/Kconfig.nfsd
> index 55e2bbcbace9..946c2c101b58 100644
> --- a/kconfigs/Kconfig.nfsd
> +++ b/kconfigs/Kconfig.nfsd
> @@ -62,3 +62,13 @@ config NFSD_THREADS
> default 8
> help
> Number of nfsd threads to start up for testing.
> +
> +config NFSD_LEASE_TIME
> + int "NFSv4 lease time and grace period, in seconds"
> + default 90
> + help
> + Time, in seconds, that the NFS server will wait before expiring
> + a client lease. Production servers typically use 90 seconds to
> + allow a large client cohort enough time to recover their open
> + and lock state. But a shorter lease time helps certain tests
> + complete faster.
> diff --git a/playbooks/roles/nfsd/defaults/main.yml b/playbooks/roles/nfsd/defaults/main.yml
> index 047f6aee1352..4a72f4f0b048 100644
> --- a/playbooks/roles/nfsd/defaults/main.yml
> +++ b/playbooks/roles/nfsd/defaults/main.yml
> @@ -3,3 +3,4 @@
> # Our sensible defaults for the nfsd role.
> nfsd_export_label: "export"
> nfsd_export_fs_opts: ""
> +nfsd_lease_time: "90"
> diff --git a/playbooks/roles/nfsd/templates/nfs.conf.j2 b/playbooks/roles/nfsd/templates/nfs.conf.j2
> index 1be49ca74120..2396f4297014 100644
> --- a/playbooks/roles/nfsd/templates/nfs.conf.j2
> +++ b/playbooks/roles/nfsd/templates/nfs.conf.j2
> @@ -1,3 +1,5 @@
> [nfsd]
> udp=y
> threads={{ nfsd_threads }}
> +grace-time={{ nfsd_lease_time }}
> +lease-time={{ nfsd_lease_time }}
> diff --git a/scripts/nfsd.Makefile b/scripts/nfsd.Makefile
> index cab30f0c259d..40338ab93fce 100644
> --- a/scripts/nfsd.Makefile
> +++ b/scripts/nfsd.Makefile
> @@ -4,6 +4,7 @@ NFSD_EXTRA_ARGS += nfsd_export_fstype='$(subst ",,$(CONFIG_NFSD_EXPORT_FSTYPE))'
> NFSD_EXTRA_ARGS += nfsd_export_path='$(subst ",,$(CONFIG_NFSD_EXPORT_PATH))'
> NFSD_EXTRA_ARGS += nfsd_export_options='$(subst ",,$(CONFIG_NFSD_EXPORT_OPTIONS))'
> NFSD_EXTRA_ARGS += nfsd_threads=$(CONFIG_NFSD_THREADS)
> +NFSD_EXTRA_ARGS += nfsd_lease_time=$(CONFIG_NFSD_LEASE_TIME)
>
> ANSIBLE_EXTRA_ARGS += $(NFSD_EXTRA_ARGS)
>
>
Looks reasonable to me:
Reviewed-by: Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2024-02-05 11:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 19:24 [PATCH] Make the build-in NFSD server's lease time adjustable Chuck Lever
2024-02-05 11:07 ` Jeff Layton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f190e06bf8aa0749a65e3ff781e58c1001a6322.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=cel@kernel.org \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).