Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2793385ybz; Sun, 19 Apr 2020 09:45:03 -0700 (PDT) X-Google-Smtp-Source: APiQypK2roC7Y4bNd48ud8qz/bgIMDFKi9ulYoN0EHEfUR79Xz4Mz6B4HAktkSMeaBoEkwDGRe1J X-Received: by 2002:a05:6402:b17:: with SMTP id bm23mr11317148edb.137.1587314703674; Sun, 19 Apr 2020 09:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587314703; cv=none; d=google.com; s=arc-20160816; b=W70yFx4YazvBMFBla9T7PEtfSsRGDbuyvXWH866FCkx2GTVE4wZDuntWES6CIR9fRB SbGPpqGUqJv0VNNpLjIVl/MsFte86XrPP6NNXGjj6gcCuntCoHVLp/p3uZTJMOtX8imM XQdRC8s/S1CzQobVLkNE5UsR2fgHNFgoGKcfsWhI4zgG/FuR5gLCkB0dqtEyzLCMgnWT 8X8KkgCHugvzaRlS7zB15VY5pjFfrkE7N2k/RXe36ONsyHEg2FcnMc75GF4pS7+Tu/NS iwPUWTdU1O0t6x2qEygWoPyfe2fSgYxq1fwAY7lBkFi/7LWKD75Qu5+OjOX8Vs0esLNQ uX8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr; bh=FhFu2zpj+AgMXZQVRa89vGUUzKF0WSjgmyaBqIADjjs=; b=KJx7hh8Mtz8bCmtipPzZUK7oA4aQCHiaWNuJzuh8TbGcPHPkvBHXjoBFTKKaQl0UTl XArSpQUycDGQ+0UzZOOaN6hLPkbooIhkYKSAhYaz21ZYGNCMTi6elTP36RjXeewuFNhB J/rFSg0Bp+GjkTGYRNgbP9N50VqWnKCi6a40WbLQ5HXDAG5dGVGZQG7h636QQt4BQRac 8Bppcve6tPYsgtD5RJ7WJs6cYkPYK+Jr5V54EyIsqjzZX7XOqOpOjnTLHKwY8vuZaJW1 RxxQpE3jpFul5D+viOs6TuGML9pOcHM+1a58Ww/JtnHRG83e8bJmjLRdVKK9SInMzc3E /dSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f3si11375653edn.165.2020.04.19.09.44.41; Sun, 19 Apr 2020 09:45:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726601AbgDSQbQ (ORCPT + 99 others); Sun, 19 Apr 2020 12:31:16 -0400 Received: from mga07.intel.com ([134.134.136.100]:29984 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbgDSQbQ (ORCPT ); Sun, 19 Apr 2020 12:31:16 -0400 IronPort-SDR: oRsgdWIAy4YWEcP3lt72WuQqdjyD6Vm9MNtqu7OK4Cvb3FxffouP9sZjeNH8E127DJxLS+s9HV dZHlutXmqHuA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2020 09:31:15 -0700 IronPort-SDR: bHGpUcAnYkmMxIV0bsv7fC9rfz5ZJxxfgwH56Ay2uQRpgmFLmnaW5J77OTpYciMWGIX13o18dF vaYgHtcDOx8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,403,1580803200"; d="scan'208";a="456144353" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by fmsmga006.fm.intel.com with ESMTP; 19 Apr 2020 09:31:13 -0700 From: Chen Yu To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Chen Yu Subject: [PATCH 1/2] sched: Make newidle_balance() static again Date: Mon, 20 Apr 2020 00:31:42 +0800 Message-Id: <6a614d7e5487d4e4c16eeddbf95dda94a776d7c0.1587309963.git.yu.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After Commit 6e2df0581f56 ("sched: Fix pick_next_task() vs 'change' pattern race"), there is no need to expose newidle_balance() as it is only used within fair.c file. Change this function back to static again. No functional change. Suggested-by: Peter Zijlstra Signed-off-by: Chen Yu --- kernel/sched/fair.c | 4 +++- kernel/sched/sched.h | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 02f323b85b6d..da7a505c28a6 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -86,6 +86,8 @@ static unsigned int normalized_sysctl_sched_wakeup_granularity = 1000000UL; const_debug unsigned int sysctl_sched_migration_cost = 500000UL; +static int newidle_balance(struct rq *this_rq, struct rq_flags *rf); + int sched_thermal_decay_shift; static int __init setup_sched_thermal_decay_shift(char *str) { @@ -10425,7 +10427,7 @@ static inline void nohz_newidle_balance(struct rq *this_rq) { } * 0 - failed, no new tasks * > 0 - success, new (fair) tasks present */ -int newidle_balance(struct rq *this_rq, struct rq_flags *rf) +static int newidle_balance(struct rq *this_rq, struct rq_flags *rf) { unsigned long next_balance = jiffies + HZ; int this_cpu = this_rq->cpu; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index db3a57675ccf..be83f88495fb 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1504,14 +1504,10 @@ static inline void unregister_sched_domain_sysctl(void) } #endif -extern int newidle_balance(struct rq *this_rq, struct rq_flags *rf); - #else static inline void sched_ttwu_pending(void) { } -static inline int newidle_balance(struct rq *this_rq, struct rq_flags *rf) { return 0; } - #endif /* CONFIG_SMP */ #include "stats.h" -- 2.20.1