kernel/latencytop.c: rename clear_all_latency_tracing to clear_tsk_latency_tracing
authorLin Feng <linf@wangsu.com>
Tue, 14 May 2019 22:42:34 +0000 (15:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 May 2019 02:52:49 +0000 (19:52 -0700)
The name clear_all_latency_tracing is misleading, in fact which only
clear per task's latency_record[], and we do have another function named
clear_global_latency_tracing which clear the global latency_record[]
buffer.

Link: http://lkml.kernel.org/r/20190226114602.16902-1-linf@wangsu.com
Signed-off-by: Lin Feng <linf@wangsu.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/base.c
include/linux/latencytop.h
kernel/fork.c
kernel/latencytop.c

index b6ccb6c57706be39c1911b832f19ab91d87f644a..9c8ca6cd3ce42d19809f3104482ac01cee2b5ce1 100644 (file)
@@ -510,7 +510,7 @@ static ssize_t lstats_write(struct file *file, const char __user *buf,
 
        if (!task)
                return -ESRCH;
-       clear_all_latency_tracing(task);
+       clear_tsk_latency_tracing(task);
        put_task_struct(task);
 
        return count;
index 7c560e0dc8f4d6793ba00553bea63d2cb1de2a87..9022f0c2e2e41ea40265c564fe25a2a6f9fa831a 100644 (file)
@@ -36,7 +36,7 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter)
                __account_scheduler_latency(task, usecs, inter);
 }
 
-void clear_all_latency_tracing(struct task_struct *p);
+void clear_tsk_latency_tracing(struct task_struct *p);
 
 extern int sysctl_latencytop(struct ctl_table *table, int write,
                        void __user *buffer, size_t *lenp, loff_t *ppos);
@@ -48,7 +48,7 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter)
 {
 }
 
-static inline void clear_all_latency_tracing(struct task_struct *p)
+static inline void clear_tsk_latency_tracing(struct task_struct *p)
 {
 }
 
index b409e792aadcce7a71abbe97c4fca723345cd3b9..b4cba953040a0f46ef6c9139099f1f9bef3b005e 100644 (file)
@@ -2093,7 +2093,7 @@ static __latent_entropy struct task_struct *copy_process(
 #ifdef TIF_SYSCALL_EMU
        clear_tsk_thread_flag(p, TIF_SYSCALL_EMU);
 #endif
-       clear_all_latency_tracing(p);
+       clear_tsk_latency_tracing(p);
 
        /* ok, now we should be set up.. */
        p->pid = pid_nr(pid);
index bbde5614da71938ae20d82bb359b44c20f1c8f6a..871734ea2f045a5ec7787c6d27d4951118c74df9 100644 (file)
@@ -67,7 +67,7 @@ static struct latency_record latency_record[MAXLR];
 
 int latencytop_enabled;
 
-void clear_all_latency_tracing(struct task_struct *p)
+void clear_tsk_latency_tracing(struct task_struct *p)
 {
        unsigned long flags;