Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp205909ima; Fri, 15 Mar 2019 00:33:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5kH18l6CnhGubXcbFHx5Y5b8oqWKRPTaiRDwrMK5f7CuEI0gFmg1TSprp+EDO+8CYAhZ7 X-Received: by 2002:a17:902:242:: with SMTP id 60mr2724723plc.128.1552635186072; Fri, 15 Mar 2019 00:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552635186; cv=none; d=google.com; s=arc-20160816; b=ZvOk0QZPxALKXrMt0n55Er1Wrc6LK9GBn494fGV4p3fo+5jqCXkK7JQpUOnf+Xp3PF TCC6HPaec04dC+Dyk/ZPSDm1nS74z6SxHz+RKBRkJnAkJxwm0hVcvBr7iILEBeiq/jEG lEiugpIzceDPq1VzIIT7VyJwNcBoIfZJwlUFiBcEKKs0Q+X6hKYVr1k8rylQvuuSuuFm YeF54+4T1SaW4NOnDs0NlEqpoE1FArb4RD9SO8j56Y44/Lu/yG7zbpy3MJzJPZ+E4QfW JW8yEXbCJnHCr/IR2nPA48QXGA6bnQill180N6Ng2sPZi3ITYfK82A7X9++iSiLDK0/a Gcug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=NSI5SnPu960lYYcGK1Kzyn54+GVGEVj7oVhYWXLgvaM=; b=IyZSjf9jDt1UcDL3L5xAG8s7R81NrvKZV195r0BRWBgheoORI6ui1Ex7kwFa7qAw1m GZJJf2QTYAqNMFhGYoolwgyNJvknPFAFdHNUqpOi02BLRUMV2o1x+pJ44NLvpA2LtjZ3 SVSjZGOKtdb8nlhkNt5dAbjSiqL4qx2Zss/ZDGVseDtGKbHJwl6OEq+8UN2pd7Cwf0i+ 0CImi263nAxLYPmiK67gCgAxo2Y+PvGMSOspY1Tv3h9oySDUtbKU9Vd962i8SjVexGZO Unl4qqQRK5FL/oM+8DnTNDVxqeRQXAqGkllw9h+2cnVAbbH72SHBsNoCqSsMYIVH63kz XOdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YYclonLB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9si1255522pgn.358.2019.03.15.00.32.51; Fri, 15 Mar 2019 00:33:06 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YYclonLB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728350AbfCOHcI (ORCPT + 99 others); Fri, 15 Mar 2019 03:32:08 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33290 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726790AbfCOHcH (ORCPT ); Fri, 15 Mar 2019 03:32:07 -0400 Received: by mail-pg1-f194.google.com with SMTP id i7so2617202pgq.0 for ; Fri, 15 Mar 2019 00:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=NSI5SnPu960lYYcGK1Kzyn54+GVGEVj7oVhYWXLgvaM=; b=YYclonLBmRnTDp8eKBtr0A4ujNy37uVhx8u5LGfgL6OUK8WIuSntzWJjsRDRxORaDA NS9F1f+JiJQR1vOur8AWYNO6yldn+3nCmcYBhJpvRpcXybqyoY+AOOjVSK7gU9tWWt6o P7T9Rd5qVGvAgvzvscvq+hZcGes2YQhQdibdVlh/bT2KQgj4KxuWN+Lh3RacEYCKA8U6 IaUMSbUwH2NifmeoAYYJsPn5DpSh3W130P6G7zcjlgiGHU7juhdImC2SBSz97wTjcnYS aPY0QA+PizPkeyGG3PA372nOA5sRv1MiFEmcSV5GpsJcmvnmqzvhyfHkrZOBrTXYKqOC nE3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NSI5SnPu960lYYcGK1Kzyn54+GVGEVj7oVhYWXLgvaM=; b=bY5wU+fjht3KMbRxW7SN3FoHs29QUGsOR8nXl9zzV3r/zGb32E6WfAPFZNKCPt6OS4 D+e1O5nXprXDDscsTrnvo7u90HmolPOGVvYlQDd04svoqtkfBsF772w+0qhzDEdrDUGq yZZbzizgCjVoSyPUFVpRX8EhoKPhX/U/jDWZNYN4yJWf8jsTGXv7WdQq3u1ULmoy8oSF AToAzulgR17Y5An/PK3CiD6nNDP76DCa/h4d9giv5ROc3TVb+OHL58ZMvFPx3t9Crl5a E5KaTN4HK+flGaHvBp/Kx1ZFUVvnd4Yybo+NeIyD/UFmIioNBuU8wCDHepQ72gao+hUW yMSw== X-Gm-Message-State: APjAAAUyWk/Xdl2BqsCokVDQK5fui45L4T8Rkwqwih/NYapLN7IM0Mp/ 7ezWggJBzrqfywLBISstHlE= X-Received: by 2002:a63:4142:: with SMTP id o63mr1977446pga.81.1552635126985; Fri, 15 Mar 2019 00:32:06 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id m13sm2023766pff.175.2019.03.15.00.32.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Mar 2019 00:32:05 -0700 (PDT) From: Yafang Shao To: peterz@infradead.org Cc: linux-kernel@vger.kernel.org, shaoyafang@didiglobal.com, Yafang Shao Subject: [PATCH] sched: fair: fix error statement in check_schedstat_required() Date: Fri, 15 Mar 2019 15:31:45 +0800 Message-Id: <1552635105-23484-1-git-send-email-laoar.shao@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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