Use register_sysctl() to register the sysctl interface to avoid merge conflicts when different features modify sysctl.c at the same time. Here, the sysctl interfaces of hung task and watchdog are moved to the corresponding feature code files https://lkml.org/lkml/2020/5/11/1419 Xiaoming Ni (4): hung_task: Move hung_task syscl interface to hung_task_sysctl.c proc/sysctl: add shared variables -1 watchdog: move watchdog sysctl to watchdog.c sysctl: Add register_sysctl_init() interface fs/proc/proc_sysctl.c | 2 +- include/linux/sched/sysctl.h | 8 +-- include/linux/sysctl.h | 3 + kernel/Makefile | 4 +- kernel/hung_task.c | 6 +- kernel/hung_task.h | 21 ++++++ kernel/hung_task_sysctl.c | 66 +++++++++++++++++ kernel/sysctl.c | 168 ++++++------------------------------------- kernel/watchdog.c | 101 ++++++++++++++++++++++++++ 9 files changed, 219 insertions(+), 160 deletions(-) create mode 100644 kernel/hung_task.h create mode 100644 kernel/hung_task_sysctl.c -- 1.8.5.6