Skip to content

s390: simplify sysctl registration

Luis Chamberlain linux-fsdevel linux-patches linux-s390 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6s390: simplify one-level sysctl registration for topology_ctl_tablearch/s390/kernel/topology.c+1 -110 replies
2/6s390: simplify one-level syctl registration for s390dbf_tablearch/s390/kernel/debug.c+1 -110 replies
3/6s390: simplify one-level sysctl registration for appldata_tablearch/s390/appldata/appldata_base.c+1 -110 replies
4/6s390: simplify one level sysctl registration for cmm_tablearch/s390/mm/cmm.c+1 -110 replies
5/6s390: simplify one-level sysctl registration for page_table_sysctlarch/s390/mm/pgalloc.c+1 -110 replies
6/6s390: simplify dynamic sysctl registration for appldata_register_opsarch/s390/appldata/appldata_base.c+7 -111 reply

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchVasily Gorbik
SeriesR-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] s390: simplify sysctl registration

s390 is the last architecture and one of the last users of register_sysctl_table(). It was last becuase it had one use case with dynamic memory allocation and it just required a bit more thought.

This is all being done to help reduce code and avoid usage of API calls for sysctl registration that can incur recusion. The recursion only happens when you have subdirectories with entries and s390 does not have any of that so either way recursion is avoided. Long term though we can do away with just removing register_sysctl_table() and then using ARRAY_SIZE() and save us tons of memory all over the place by not having to add an extra empty entry all over.

Hopefully that commit log suffices for the dynamic allocation conversion, but I would really like someone to test it as I haven't tested a single patch, I'm super guiltly to accept I've just waited for patches to finish compile testing and that's not over yet.

Anyway the changes other than the dynamic allocation one are pretty trivial. That one could use some good review.

With all this out of the way we have just one stupid last user of register_sysctl_table(): drivers/parport/procfs.c

That one is also dynamic. Hopefully the maintainer will be motivated to do that conversion with all the examples out there now and this having a complex one.

For more information refer to the new docs:

https://lore.kernel.org/all/[email protected]/T/#u

Luis Chamberlain (6):
s390: simplify one-level sysctl registration for topology_ctl_table
s390: simplify one-level syctl registration for s390dbf_table
s390: simplify one-level sysctl registration for appldata_table
s390: simplify one level sysctl registration for cmm_table
s390: simplify one-level sysctl registration for page_table_sysctl
s390: simplify dynamic sysctl registration for appldata_register_ops

 arch/s390/appldata/appldata_base.c | 30 ++++++++----------------------
 arch/s390/kernel/debug.c           | 12 +-----------
 arch/s390/kernel/topology.c        | 12 +-----------
 arch/s390/mm/cmm.c                 | 12 +-----------
 arch/s390/mm/pgalloc.c             | 12 +-----------
 5 files changed, 12 insertions(+), 66 deletions(-)
Signature · 1 line
2.39.1