Skip to contentSkip to conversation

latencytop: move sysctl to its own file

PATCH In review Liao Hua 2 participants 2 messages Apr 7, 2022 – Apr 15, 2022

Subsystems (2)
lore
Share & tools
lore

Liao Hua

author
#0 lore raw

PATCH v3 1/1 latencytop: move sysctl to its own file

From: liaohua <[email protected]>

This moves latencytop sysctl to kernel/latencytop.c

------
v3:
Base the patch on the latest sysctl-next and resubmit.

v2: https://lore.kernel.org/lkml/[email protected]/
Move latencytop sysctl to its own file base based on sysctl-next.

v1: https://lore.kernel.org/lkml/[email protected]/
Move latencytop sysctl to its own file base based on linux master.

---
 include/linux/latencytop.h |  3 ---
 kernel/latencytop.c        | 41 +++++++++++++++++++++++++++++------------
 kernel/sysctl.c            | 10 ----------
 3 files changed, 29 insertions(+), 25 deletions(-)
include/linux/latencytop.h +0 -3
index abe3d95f795b..84f1053cf2a8 100644
@@ -38,9 +38,6 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter)
 
 void clear_tsk_latency_tracing(struct task_struct *p);
 
-int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
-		size_t *lenp, loff_t *ppos);
-
 #else
 
 static inline void
kernel/latencytop.c +29 -12

59 lines not on this page · raw message

kernel/sysctl.c +0 -10
index 21172d3dad6e..2db637ca91c9 100644
@@ -65,7 +65,6 @@
 #include <linux/bpf.h>
 #include <linux/mount.h>
 #include <linux/userfaultfd_k.h>
-#include <linux/latencytop.h>
 #include <linux/pid.h>
 
 #include "../lib/kstrtox.h"
@@ -1685,15 +1684,6 @@ static struct ctl_table kern_table[] = {
 		.extra2		= SYSCTL_ONE,
 	},
 #endif
-#ifdef CONFIG_LATENCYTOP
-	{
-		.procname	= "latencytop",
-		.data		= &latencytop_enabled,
-		.maxlen		= sizeof(int),
-		.mode		= 0644,
-		.proc_handler	= sysctl_latencytop,
-	},
-#endif
 	{
 		.procname	= "print-fatal-signals",
 		.data		= &print_fatal_signals,
Signature · 1 line
2.12.3