linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: peterz@infradead.org
Cc: linux-kernel@vger.kernel.org, shaoyafang@didiglobal.com,
	Yafang Shao <laoar.shao@gmail.com>
Subject: [PATCH] sched: fair: fix error statement in check_schedstat_required()
Date: Fri, 15 Mar 2019 15:31:45 +0800	[thread overview]
Message-ID: <1552635105-23484-1-git-send-email-laoar.shao@gmail.com> (raw)

sched_stat_runtime doesn't require CONFIG_SCHEDSTATS currently,
not to mention kernel parameter schedstats=enable or
kernel.sched_schedstats=1.

I think that is okay for sched_stat_runtime, because the information
reported in sched_stat_runtime isn't related with CONFIG_SCHEDSTATS.
So I remove the statement about sched_stat_runtime in
check_schedstat_required().

Some other minor changes in this patch,
- stat_wait is missed in the print log before.
- CONFIG_SCHEDSTATS is unnecessary as schedstat_enabled() is used.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
 kernel/sched/fair.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8213ff6..dc0d7ef 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3831,7 +3831,6 @@ static void check_spread(struct cfs_rq *cfs_rq, struct sched_entity *se)
 
 static inline void check_schedstat_required(void)
 {
-#ifdef CONFIG_SCHEDSTATS
 	if (schedstat_enabled())
 		return;
 
@@ -3839,14 +3838,12 @@ static inline void check_schedstat_required(void)
 	if (trace_sched_stat_wait_enabled()    ||
 			trace_sched_stat_sleep_enabled()   ||
 			trace_sched_stat_iowait_enabled()  ||
-			trace_sched_stat_blocked_enabled() ||
-			trace_sched_stat_runtime_enabled())  {
+			trace_sched_stat_blocked_enabled()) {
 		printk_deferred_once("Scheduler tracepoints stat_sleep, stat_iowait, "
-			     "stat_blocked and stat_runtime require the "
+			     "stat_blocked and stat_wait require the "
 			     "kernel parameter schedstats=enable or "
 			     "kernel.sched_schedstats=1\n");
 	}
-#endif
 }
 
 
-- 
1.8.3.1


                 reply	other threads:[~2019-03-15  7:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1552635105-23484-1-git-send-email-laoar.shao@gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=shaoyafang@didiglobal.com \
    /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;
as well as URLs for NNTP newsgroup(s).