linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 -next 00/16] sysctl: move sysctls from vm_table into its own files
@ 2025-01-11  7:07 Kaixiong Yu
  2025-01-11  7:07 ` [PATCH v5 -next 01/16] mm: vmstat: move sysctls to mm/vmstat.c Kaixiong Yu
                   ` (16 more replies)
  0 siblings, 17 replies; 24+ messages in thread
From: Kaixiong Yu @ 2025-01-11  7:07 UTC (permalink / raw)
  To: akpm, mcgrof, joel.granados
  Cc: ysato, dalias, glaubitz, luto, tglx, mingo, bp, dave.hansen, hpa,
	viro, brauner, jack, kees, j.granados, willy, Liam.Howlett,
	vbabka, lorenzo.stoakes, trondmy, anna, chuck.lever, jlayton,
	neilb, okorniev, Dai.Ngo, tom, davem, edumazet, kuba, pabeni,
	paul, jmorris, linux-sh, linux-kernel, linux-fsdevel, linux-mm,
	linux-nfs, netdev, linux-security-module, dhowells, haifeng.xu,
	baolin.wang, shikemeng, dchinner, bfoster, souravpanda, hannes,
	rientjes, pasha.tatashin, david, ryan.roberts, ying.huang, yang,
	zev, serge, vegard.nossum, wangkefeng.wang

This patch series moves sysctls of vm_table in kernel/sysctl.c to
places where they actually belong, and do some related code clean-ups.
After this patch series, all sysctls in vm_table have been moved into its
own files, meanwhile, delete vm_table.

All the modifications of this patch series base on
linux-next(tags/next-20250110). To test this patch series, the code was
compiled with both the CONFIG_SYSCTL enabled and disabled on arm64 and
x86_64 architectures. After this patch series is applied, all files
under /proc/sys/vm can be read or written normally.

my test steps as below listed:

Step 1: Set CONFIG_SYSCTL to 'n' and compile the Linux kernel on the
arm64 architecture. The kernel compiles successfully without any errors
or warnings.

Step 2: Set CONFIG_SYSCTL to 'y' and compile the Linux kernel on the
arm64 architecture. The kernel compiles successfully without any errors
or warnings.

Step 3: Use QEMU to boot the kernel compiled in Step 2, then use the
Linux command |ls -ll /proc/sys/vm/| to check the permissions of all
sysctls under the |/proc/sys/vm| directory.
When compared with the kernel version that did not apply this series of
patches, there is no difference in the sysctl permissions under the
|/proc/sys/vm| directory between the two kernel versions.

Step 4: Repeat steps 1 to 3 on the x86_64 architecture.

Changes in v5:
 - add reviewed-by from Lorenzo Stoakes in patch6,8
 - Accept Brian Gerst's suggestion to reduce the preprocessor
   condition "#elif (defined(CONFIG_X86_32) && !defined(CONFIG_UML))"
   in patch13
 - fix the error discovered by Geert Uytterhoeven in patch14 in V4.
   Move the call to register_sysctl_init() into its own fs_initcall()
   as Geert Uytterhoeven's patch does.
 - take the advice of Joel Granados, separating patch14 in V4 into
   patch14 and patch15 in V5. patch14 in V5 just moves the vdso_enabled
   table. patch15 in V5 removes the vm_table.
 - modify the change log of patch14
 - clarify test steps.

Changes in v4:
 - due to my mistake, the previous version sent 15 patches twice.
   Please ignore that, as this version is the correct one.
 - change all "static struct ctl_table" type into
   "static const struct ctl_table" type in patch1~10,12,13,14
 - simplify result of rpcauth_cache_shrink_count() in patch11

Changes in v3:
 - change patch1~10, patch14 title suggested by Joel Granados
 - change sysctl_stat_interval to static type in patch1
 - add acked-by from Paul Moore in patch7
 - change dirtytime_expire_interval to static type in patch9
 - add acked-by from Anna Schumaker in patch11

Changes in v2:
 - fix sysctl_max_map_count undeclared issue in mm/nommu.c for patch6
 - update changelog for patch7/12, suggested by Kees/Paul
 - fix patch8, sorry for wrong changes and forget to built with NOMMU
 - add reviewed-by from Kees except patch8 since patch8 is wrong in v1
 - add reviewed-by from Jan Kara, Christian Brauner in patch12

Kaixiong Yu (16):
  mm: vmstat: move sysctls to mm/vmstat.c
  mm: filemap: move sysctl to mm/filemap.c
  mm: swap: move sysctl to mm/swap.c
  mm: vmscan: move vmscan sysctls to mm/vmscan.c
  mm: util: move sysctls to mm/util.c
  mm: mmap: move sysctl to mm/mmap.c
  security: min_addr: move sysctl to security/min_addr.c
  mm: nommu: move sysctl to mm/nommu.c
  fs: fs-writeback: move sysctl to fs/fs-writeback.c
  fs: drop_caches: move sysctl to fs/drop_caches.c
  sunrpc: simplify rpcauth_cache_shrink_count()
  fs: dcache: move the sysctl to fs/dcache.c
  x86: vdso: move the sysctl to arch/x86/entry/vdso/vdso32-setup.c
  sh: vdso: move the sysctl to arch/sh/kernel/vsyscall/vsyscall.c
  sysctl: remove the vm_table
  sysctl: remove unneeded include

 arch/sh/kernel/vsyscall/vsyscall.c |  20 +++
 arch/x86/entry/vdso/vdso32-setup.c |  16 ++-
 fs/dcache.c                        |  21 ++-
 fs/drop_caches.c                   |  23 ++-
 fs/fs-writeback.c                  |  30 ++--
 include/linux/dcache.h             |   7 +-
 include/linux/mm.h                 |  23 ---
 include/linux/mman.h               |   2 -
 include/linux/swap.h               |   9 --
 include/linux/vmstat.h             |  11 --
 include/linux/writeback.h          |   4 -
 kernel/sysctl.c                    | 221 -----------------------------
 mm/filemap.c                       |  18 ++-
 mm/internal.h                      |  10 ++
 mm/mmap.c                          |  54 +++++++
 mm/nommu.c                         |  15 +-
 mm/swap.c                          |  16 ++-
 mm/swap.h                          |   1 +
 mm/util.c                          |  67 +++++++--
 mm/vmscan.c                        |  23 +++
 mm/vmstat.c                        |  44 +++++-
 net/sunrpc/auth.c                  |   2 +-
 security/min_addr.c                |  11 ++
 23 files changed, 336 insertions(+), 312 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2025-02-05 12:40 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-11  7:07 [PATCH v5 -next 00/16] sysctl: move sysctls from vm_table into its own files Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 01/16] mm: vmstat: move sysctls to mm/vmstat.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 02/16] mm: filemap: move sysctl to mm/filemap.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 03/16] mm: swap: move sysctl to mm/swap.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 04/16] mm: vmscan: move vmscan sysctls to mm/vmscan.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 05/16] mm: util: move sysctls to mm/util.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 06/16] mm: mmap: move sysctl to mm/mmap.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 07/16] security: min_addr: move sysctl to security/min_addr.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 08/16] mm: nommu: move sysctl to mm/nommu.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 09/16] fs: fs-writeback: move sysctl to fs/fs-writeback.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 10/16] fs: drop_caches: move sysctl to fs/drop_caches.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 11/16] sunrpc: simplify rpcauth_cache_shrink_count() Kaixiong Yu
2025-01-17  9:55   ` Joel Granados
2025-01-11  7:07 ` [PATCH v5 -next 12/16] fs: dcache: move the sysctl to fs/dcache.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 13/16] x86: vdso: move the sysctl to arch/x86/entry/vdso/vdso32-setup.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 14/16] sh: vdso: move the sysctl to arch/sh/kernel/vsyscall/vsyscall.c Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 15/16] sysctl: remove the vm_table Kaixiong Yu
2025-01-11  7:07 ` [PATCH v5 -next 16/16] sysctl: remove unneeded include Kaixiong Yu
2025-01-13  5:10   ` Kalesh Anakkur Purayil
2025-01-13  6:59     ` yukaixiong
2025-01-14 13:50 ` [PATCH v5 -next 00/16] sysctl: move sysctls from vm_table into its own files Joel Granados
2025-01-15  1:53   ` yukaixiong
2025-01-16 10:03     ` Joel Granados
2025-02-05 12:39   ` Joel Granados

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox