[GIT PULL] sysctl changes for v6.4-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Note: given we *save* memory per each change move away from each
deprecated call, I don't see a need to immediately *pause* all
kernel/sysctl.c moves. Each replacement of a deprecated call saves
us memory and likely more than a the simple empty entry when we move
a kernel/syctl.c entry to its own file.

So if you're doing a move of a sysctl from kernel/sysctl.c, help with
karma points by replacing a deprecated call :)

The following changes since commit 17214b70a159c6547df9ae204a6275d983146f6b:

  Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux (2023-03-20 15:20:33 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/ tags/sysctl-6.4-rc1

for you to fetch changes up to e3184de9d46c2eebdb776face2e2662c6733331d:

  fs: fix sysctls.c built (2023-04-13 12:39:44 -0700)

----------------------------------------------------------------
sysctl-6.4-rc1

This pull request goes with only a few sysctl moves from the
kernel/sysctl.c file, the rest of the work has been put towards
deprecating two API calls which incur recursion and prevent us
from simplifying the registration process / saving memory per
move. Most of the changes have been soaking on linux-next since
v6.3-rc3.

I've slowed down the kernel/sysctl.c moves due to Matthew Wilcox's
feedback that we should see if we could *save* memory with these
moves instead of incurring more memory. We currently incur more
memory since when we move a syctl from kernel/sysclt.c out to its
own file we end up having to add a new empty sysctl used to register
it. To achieve saving memory we want to allow syctls to be passed
without requiring the end element being empty, and just have our
registration process rely on ARRAY_SIZE(). Without this, supporting
both styles of sysctls would make the sysctl registration pretty
brittle, hard to read and maintain as can be seen from Meng Tang's
efforts to do just this [0]. Fortunately, in order to use ARRAY_SIZE()
for all sysctl registrations also implies doing the work to deprecate
two API calls which use recursion in order to support sysctl
declarations with subdirectories.

And so during this development cycle quite a bit of effort went into
this deprecation effort. I've annotated the following two APIs are
deprecated and in few kernel releases we should be good to remove them:

  * register_sysctl_table()
  * register_sysctl_paths()

During this merge window we should be able to deprecate and unexport
register_sysctl_paths(), we can probably do that towards the end
of this merge window.

Deprecating register_sysctl_table() will take a bit more time but
this pull request goes with a few example of how to do this.

As it turns out each of the conversions to move away from either of
these two API calls *also* saves memory. And so long term, all these
changes *will* prove to have saved a bit of memory on boot.

The way I see it then is if remove a user of one deprecated call, it
gives us enough savings to move one kernel/sysctl.c out from the
generic arrays as we end up with about the same amount of bytes.

Since deprecating register_sysctl_table() and register_sysctl_paths()
does not require maintainer coordination except the final unexport
you'll see quite a bit of these changes from other pull requests, I've
just kept the stragglers after rc3.

Most of these changes have been soaking on linux-next since around rc3.

[0] https://lkml.kernel.org/r/ZAD+cpbrqlc5vmry@xxxxxxxxxxxxxxxxxxxxxx

----------------------------------------------------------------
Arnd Bergmann (1):
      mm: compaction: remove incorrect #ifdef checks

Kefeng Wang (3):
      mm: hugetlb: move hugeltb sysctls to its own file
      mm: memory-failure: Move memory failure sysctls to its own file
      fs: fix sysctls.c built

Luis Chamberlain (23):
      proc_sysctl: update docs for __register_sysctl_table()
      proc_sysctl: move helper which creates required subdirectories
      sysctl: clarify register_sysctl_init() base directory order
      apparmor: simplify sysctls with register_sysctl_init()
      loadpin: simplify sysctls use with register_sysctl()
      yama: simplfy sysctls with register_sysctl()
      seccomp: simplify sysctls with register_sysctl_init()
      csky: simplify alignment sysctl registration
      scsi: simplify sysctl registration with register_sysctl()
      hv: simplify sysctl registration
      md: simplify sysctl registration
      xen: simplify sysctl registration for balloon
      proc_sysctl: enhance documentation
      lockd: simplify two-level sysctl registration for nlm_sysctls
      nfs: simplify two-level sysctl registration for nfs4_cb_sysctls
      nfs: simplify two-level sysctl registration for nfs_cb_sysctls
      xfs: simplify two-level sysctl registration for xfs_table
      fs/cachefiles: simplify one-level sysctl registration for cachefiles_sysctls
      coda: simplify one-level sysctl registration for coda_table
      ntfs: simplfy one-level sysctl registration for ntfs_sysctls
      utsname: simplify one-level sysctl registration for uts_kern_table
      ia64: simplify one-level sysctl registration for kdump_ctl_table
      arm: simplify two-level sysctl registration for ctl_isa_vars

Minghao Chi (1):
      mm: compaction: move compaction sysctl to its own file

ZhangPeng (1):
      userfaultfd: move unprivileged_userfaultfd sysctl to its own file

 arch/arm/kernel/isa.c         |  18 +------
 arch/csky/abiv1/alignment.c   |  15 +-----
 arch/ia64/kernel/crash.c      |  11 +---
 drivers/hv/vmbus_drv.c        |  11 +---
 drivers/md/md.c               |  22 +-------
 drivers/scsi/scsi_sysctl.c    |  16 +-----
 drivers/xen/balloon.c         |  20 +------
 fs/Makefile                   |   3 +-
 fs/cachefiles/error_inject.c  |  11 +---
 fs/coda/sysctl.c              |  11 +---
 fs/lockd/svc.c                |  20 +------
 fs/nfs/nfs4sysctl.c           |  21 +-------
 fs/nfs/sysctl.c               |  20 +------
 fs/ntfs/sysctl.c              |  12 +----
 fs/proc/proc_sysctl.c         |  88 +++++++++++++++++++-----------
 fs/userfaultfd.c              |  20 ++++++-
 fs/xfs/xfs_sysctl.c           |  20 +------
 include/linux/compaction.h    |   7 ---
 include/linux/hugetlb.h       |   8 ---
 include/linux/mm.h            |   2 -
 include/linux/userfaultfd_k.h |   2 -
 kernel/seccomp.c              |  15 +-----
 kernel/sysctl.c               | 122 ------------------------------------------
 kernel/utsname_sysctl.c       |  11 +---
 mm/compaction.c               |  80 ++++++++++++++++++++++-----
 mm/hugetlb.c                  |  51 ++++++++++++++++--
 mm/memory-failure.c           |  36 ++++++++++++-
 security/apparmor/lsm.c       |   8 +--
 security/loadpin/loadpin.c    |   8 +--
 security/yama/yama_lsm.c      |   8 +--
 30 files changed, 248 insertions(+), 449 deletions(-)



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux