From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>,
Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
NeilBrown <neilb@suse.com>, Dai Ngo <dai.ngo@oracle.com>,
"olga.kornievskaia" <olga.kornievskaia@gmail.com>,
Tom Talpey <tom@talpey.com>
Cc: linux-nfs <linux-nfs@vger.kernel.org>
Subject: Should we establish a new nfsdctl userland program?
Date: Thu, 25 Jan 2024 14:40:00 -0500 [thread overview]
Message-ID: <8a7bbc05b6515109692cb88ad68374d14fc01eca.camel@kernel.org> (raw)
The existing rpc.nfsd program was designed during a different time, when
we just didn't require that much control over how it behaved. It's
klunky to work with.
In a response to Chuck's recent RFC patch to add knob to disable
READ_PLUS calls, I mentioned that it might be a good time to make a
clean break from the past and start a new program for controlling nfsd.
Here's what I'm thinking:
Let's build a swiss-army-knife kind of interface like git or virsh:
# nfsdctl stats <--- fetch the new stats that got merged
# nfsdctl add_listener <--- add a new listen socket, by address or hostname
# nfsdctl set v3 on <--- enable NFSv3
# nfsdctl set splice_read off <--- disable splice reads (per Chuck's recent patch)
# nfsdctl set threads 128 <--- spin up the threads
We could start with just the bare minimum for now (the stats interface),
and then expand on it. Once we're at feature parity with rpc.nfsd, we'd
want to have systemd preferentially use nfsdctl instead of rpc.nfsd to
start and stop the server. systemd will also need to fall back to using
rpc.nfsd if nfsdctl or the netlink program isn't present.
Note that I think this program will have to be a compiled binary vs. a
python script or the like, given that it'll be involved in system
startup.
It turns out that Lorenzo already has a C program that has a lot of the
plumbing we'd need:
https://github.com/LorenzoBianconi/nfsd-netlink
I think it might be good to clean up the interface a bit, build a
manpage and merge that into nfs-utils.
Questions:
1/ one big binary, or smaller nfsdctl-* programs (like git uses)?
2/ should it automagically read in nfs.conf? (I tend to think it should,
but we might want an option to disable that)
3/ should "set threads" activate the server, or just set a count, and
then we do a separate activation step to start it? If we want that, then
we may want to twiddle the proposed netlink interface a bit.
I'm sure other questions will arise as we embark on this too.
Thoughts? Anyone have objections to this idea?
--
Jeff Layton <jlayton@kernel.org>
next reply other threads:[~2024-01-25 19:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 19:40 Jeff Layton [this message]
2024-01-25 19:54 ` Should we establish a new nfsdctl userland program? Cedric Blancher
2024-01-25 20:24 ` Chuck Lever III
2024-01-26 0:50 ` Dan Shelton
2024-01-26 2:37 ` Chuck Lever III
2024-01-26 7:26 ` NeilBrown
2024-01-25 21:11 ` NeilBrown
2024-01-25 23:04 ` Jeff Layton
2024-02-02 17:08 ` Lorenzo Bianconi
2024-02-02 17:56 ` Jeff Layton
2024-02-05 16:46 ` Lorenzo Bianconi
2024-02-05 17:29 ` Jeff Layton
2024-02-05 17:44 ` Lorenzo Bianconi
2024-02-05 18:03 ` Jeff Layton
2024-02-05 19:18 ` Chuck Lever III
2024-02-05 19:44 ` NeilBrown
2024-02-05 19:50 ` Chuck Lever III
2024-02-05 21:09 ` NeilBrown
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=8a7bbc05b6515109692cb88ad68374d14fc01eca.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=neilb@suse.com \
--cc=olga.kornievskaia@gmail.com \
--cc=tom@talpey.com \
/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 NNTP newsgroup(s).