Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp498858img; Tue, 26 Feb 2019 03:54:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IaWJZu0AzHFLate8h2KyBH8VZcW67lyOYn7u1usu8qkIW8xfXPwgbY0wRBxjFNNhPbvP+Mf X-Received: by 2002:a17:902:1102:: with SMTP id d2mr25887516pla.138.1551182091862; Tue, 26 Feb 2019 03:54:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551182091; cv=none; d=google.com; s=arc-20160816; b=PyAezDXtoyyz+rE+4/TD0Z6ws5UGh2abNboW41WPMslvOuhV/PBkQDzNCPlcD23SeV M8OiLfsTa2bxCg/pe+djX5KguOJurVQIRgB2Bu4sUEXljjb7JX/CWylHJE7txEkcpPhM qSLvh16Ns2V2nF3JhPS+BK7WLAwcA7rkEFj6IDhGiEvpuMoha1xh0QLPc4sx5kMMlZBU qCz938Cp/hMZ3HJRPEs393LOyKypzP62t86UnKZrDP8J12876SBfmed9p1sSghxy+Mz2 IGflMNHxiviO/VWf/fEsu4vSRI91JqfZcl3YHvPPgehact6AJcK2TnjQmm4E4gWpBZVr 44DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=NYFzrpQfVODlhwlYhra6B8VVFaw8EIyFaTQDdAe/66k=; b=y2A879C110hDHciA6UADFZja/0kK3Dlh7+nv5nZZNwowjnSlFlnJfdXwC9z91rve6k IaeW7bzMOlj3sFU2YCYLahPsD+2N5amZx0Xoq8rdK5XEvFkig6I37fx7ePcHSigCcDdp maTumnatrMbyja9b3R4BGvML8UBi1i0wCyBvDym+z4DkUhS8dJ/36RAqhh1XOfpCjXZs o491AxMDCd67mus8ClrXfftjkFQ+ANP1GvQyAmPnL8CtOxyo6D8BEzO1I6lD5sEf8xIl nY78kOpJelN+yIV9YiyabIOlttv6aQS7GsGZxAUQEOAtsAah0UBcYB2hAUDgt7sGwStr UNDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si11267510pgr.341.2019.02.26.03.54.36; Tue, 26 Feb 2019 03:54:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbfBZLyN (ORCPT + 99 others); Tue, 26 Feb 2019 06:54:13 -0500 Received: from aliyun-cloud.icoremail.net ([47.90.88.95]:51181 "HELO aliyun-sdnproxy-1.icoremail.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1726469AbfBZLyM (ORCPT ); Tue, 26 Feb 2019 06:54:12 -0500 Received: from bogon.wangsu.com (unknown [59.61.78.237]) by app2 (Coremail) with SMTP id 4zNnewCnJAT_JnVc+aQ9AA--.7800S2; Tue, 26 Feb 2019 19:46:13 +0800 (CST) From: Lin Feng 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 Message-Id: <20190226114602.16902-1-linf@wangsu.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: 4zNnewCnJAT_JnVc+aQ9AA--.7800S2 X-Coremail-Antispam: 1UD129KBjvJXoWxZF15CF4kXF1UAFyDZr4DXFb_yoW5Jw4xpF 1kZw17Ca1xAa1v9ry0g3yDCw15tw4kurW7GrZ5A34FqFnxKFnagFnFk3Wjyr4Yyry8Kana gF4DKw4DJF48GFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: holqwq5zdqw23xof0z/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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