mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lin Feng <linf@wangsu.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, adobriyan@gmail.com, fabf@skynet.be,
	arjan@infradead.org, linf@wangsu.com
Subject: [PATCH 1/2] kernel/latencytop.c: rename clear_all_latency_tracing to clear_tsk_latency_tracing
Date: Tue, 26 Feb 2019 19:46:01 +0800	[thread overview]
Message-ID: <20190226114602.16902-1-linf@wangsu.com> (raw)

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.

Signed-off-by: Lin Feng <linf@wangsu.com>
---
 fs/proc/base.c             | 2 +-
 include/linux/latencytop.h | 4 ++--
 kernel/fork.c              | 2 +-
 kernel/latencytop.c        | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index f5ed9512d193..da0f6112d314 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -511,7 +511,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;
diff --git a/include/linux/latencytop.h b/include/linux/latencytop.h
index 7c560e0dc8f4..9022f0c2e2e4 100644
--- a/include/linux/latencytop.h
+++ b/include/linux/latencytop.h
@@ -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)
 {
 }
 
diff --git a/kernel/fork.c b/kernel/fork.c
index b69248e6f0e0..4f32faf9dfa9 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1963,7 +1963,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);
diff --git a/kernel/latencytop.c b/kernel/latencytop.c
index 96b4179cee6a..9e794b49791e 100644
--- a/kernel/latencytop.c
+++ b/kernel/latencytop.c
@@ -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;
 
-- 
2.20.1


             reply	other threads:[~2019-02-26 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 11:46 Lin Feng [this message]
2019-02-26 11:46 ` [PATCH 2/2] kernel/latencytop.c: remove unnecessary checks for latencytop_enabled Lin Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190226114602.16902-1-linf@wangsu.com \
    --to=linf@wangsu.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®