linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] sunrpc: simplfy sysctl registrations
@ 2023-03-10 22:52 Luis Chamberlain
  2023-03-10 22:52 ` [PATCH 1/5] sunrpc: simplify two-level sysctl registration for tsvcrdma_parm_table Luis Chamberlain
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Luis Chamberlain @ 2023-03-10 22:52 UTC (permalink / raw)
  To: chuck.lever, jlayton, trond.myklebust, anna, davem, edumazet,
	pabeni, kuba, linux-nfs
  Cc: ebiederm, keescook, yzaikin, j.granados, patches, linux-fsdevel,
	netdev, linux-kernel, Luis Chamberlain

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-10 22:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 22:52 [PATCH 0/5] sunrpc: simplfy sysctl registrations Luis Chamberlain
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

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).