From: Luis Chamberlain <mcgrof@kernel.org>
To: chuck.lever@oracle.com, jlayton@kernel.org,
trond.myklebust@hammerspace.com, anna@kernel.org,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
kuba@kernel.org, linux-nfs@vger.kernel.org
Cc: ebiederm@xmission.com, keescook@chromium.org, yzaikin@google.com,
j.granados@samsung.com, patches@lists.linux.dev,
linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 0/5] sunrpc: simplfy sysctl registrations
Date: Fri, 10 Mar 2023 14:52:31 -0800 [thread overview]
Message-ID: <20230310225236.3939443-1-mcgrof@kernel.org> (raw)
We're trying to deprecate the APIs for sysctl that try to do
registration and but are exposed to recursion. Those paths are
only needed in complex cases and even those can be simplified
with time.
Sunrpc uses has simple requirements: just to have their parent
directory created. The new sysctl APIs can be used for this. If
you are curious about new requirements just review the new patch
for documentation I just posted:
https://lore.kernel.org/all/20230310223947.3917711-1-mcgrof@kernel.org/T/#u
So just simplify all this.
I haven't even build tested this, this is all being compile tested
now through sysctl-testing [0] along with the other rest of the
changes.
Posting this early in the development cycle so it gets proper testing
and review.
Feel free to take these patches or let me know and I'm happy to also
take these in through sysctl-next. Typically I use sysctl-next for
core sysctl changes or for kernel/sysctl.c cleanup to avoid conflicts.
All these syctls however are well contained to sunrpc so they can also
go in separately. Let me know how you'd like to go about these patches.
For those curious -- yes most of this is based on Coccinelle grammar,
you can see the SmPL patch I first wrote years ago for some other use
cases here:
https://lore.kernel.org/all/20211123202422.819032-6-mcgrof@kernel.org/
This is just an evolution of that with more complex cases, however
always writing the SmPL patch to each commit eats my time away and
I really cannot be bothered by that. Small modifications to the above
can be used however to do things which are similar.
Luis Chamberlain (5):
sunrpc: simplify two-level sysctl registration for tsvcrdma_parm_table
sunrpc: simplify one-level sysctl registration for xr_tunables_table
sunrpc: simplify one-level sysctl registration for xs_tunables_table
sunrpc: move sunrpc_table above
sunrpc: simplify one-level sysctl registration for debug_table
net/sunrpc/sysctl.c | 90 ++++++++++++++-------------------
net/sunrpc/xprtrdma/svc_rdma.c | 21 +-------
net/sunrpc/xprtrdma/transport.c | 11 +---
net/sunrpc/xprtsock.c | 13 +----
4 files changed, 44 insertions(+), 91 deletions(-)
--
2.39.1
next reply other threads:[~2023-03-10 22:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 22:52 Luis Chamberlain [this message]
2023-03-10 22:52 ` [PATCH 1/5] sunrpc: simplify two-level sysctl registration for tsvcrdma_parm_table Luis Chamberlain
2023-03-10 22:52 ` [PATCH 2/5] sunrpc: simplify one-level sysctl registration for xr_tunables_table Luis Chamberlain
2023-03-10 22:52 ` [PATCH 3/5] sunrpc: simplify one-level sysctl registration for xs_tunables_table Luis Chamberlain
2023-03-10 22:52 ` [PATCH 4/5] sunrpc: move sunrpc_table above Luis Chamberlain
2023-03-10 22:52 ` [PATCH 5/5] sunrpc: simplify one-level sysctl registration for debug_table Luis Chamberlain
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=20230310225236.3939443-1-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=edumazet@google.com \
--cc=j.granados@samsung.com \
--cc=jlayton@kernel.org \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=patches@lists.linux.dev \
--cc=trond.myklebust@hammerspace.com \
--cc=yzaikin@google.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).