Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4096767imu; Mon, 10 Dec 2018 13:05:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/U4LSy76lqv6kt55EZKXoqoxTIPPXdjuK74gA48rxewu2nDLM/Lsyi9+53jTgj+9mfHTycp X-Received: by 2002:a63:480f:: with SMTP id v15mr12111427pga.308.1544475920496; Mon, 10 Dec 2018 13:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544475920; cv=none; d=google.com; s=arc-20160816; b=C+OLJQizD446SBRnsYbzq4CAnn8NQFDO6sTIEWAUnxfPB9AcIusIjNvmqTWw3VTITf eFRJsxf2pVGBilfJfP1U/gLIkq2RUeHPQCcOq5YBdq3L67m2tkzoNll4oRs9fDp0Vpo7 zt7LzekuHzem/VTAKfNktOBrOuCzGV24Vpe9aQnj7OiagnW3/65V2fQ0TNmkOFQ9JRgF JEy91G+YHGR8Nysjv7N267HKMXjxUsphXV4vNC1vz1r909vxWNPbmyDYYH9BCalVwlgy 24qa0asQXFwns7xH1OkECfDg1qxH0H8N5vE/DL5z7NYxeJ/gDJM4NGfGf5w9bK9IE4kf lrcQ== 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=3S4jVmXvQDozfDAyuLxVklFIflWOwvjr9bJ+9SxwTP8=; b=i3AcTRr2rBsZR+PHFmz80SobQFs2dh+aIESLGC7A566zSTuSv4lc5YP4XJaS7UlTZQ og/4YIL+XxZYAIQ88LDfSZ9gyrlke5r5bgCDlrjMkbFkmDqbThzVMXUc4VKpdFNglpm9 Mtl/R3KpiTfusTGWBDypSML/cXfNDQcQGp+38OTnUcEiGEEOPt4ZSdSnTRFe3ruHJRfZ x6ck6XjwlHicEqEo34siv52cMA26xR/ZDEEZOgKvQdhXq5ufP/EOm4pGHigolJK1/bZo 5cithVCGiN/l7QS1+DZXkyQlHFEIe4YfsM3gGC9tWpThl9DrEW4K0KvMcaUZzdaWkHXz txOg== 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 1si11083383pls.16.2018.12.10.13.05.05; Mon, 10 Dec 2018 13:05:20 -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 S1729507AbeLJVCD (ORCPT + 99 others); Mon, 10 Dec 2018 16:02:03 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:49413 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727143AbeLJVCD (ORCPT ); Mon, 10 Dec 2018 16:02:03 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MbS0X-1h3bi81p3B-00bqzx; Mon, 10 Dec 2018 22:01:41 +0100 From: Arnd Bergmann To: Ingo Molnar , Peter Zijlstra Cc: Muchun Song , Morten Rasmussen , Arnd Bergmann , Mel Gorman , Vincent Guittot , Srikar Dronamraju , Patrick Bellasi , linux-kernel@vger.kernel.org Subject: [PATCH] sched/fair: move capacity_margin definition into #ifdef Date: Mon, 10 Dec 2018 22:01:34 +0100 Message-Id: <20181210210139.3336002-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:sFhP/E00aT2yakrdFl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org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Marking the variable static showed that it's only used for SMP builds, as seen from this warning: kernel/sched/fair.c:119:21: error: 'capacity_margin' defined but not used [-Werror=unused-variable] static unsigned int capacity_margin = 1280; This has apparently been true since the variable has first been introduced, but only now started causing a compile time warning. Fixes: ed8885a14433 ("sched/fair: Make some variables static") Fixes: 3273163c6775 ("sched/fair: Let asymmetric CPU configurations balance at wake-up") Signed-off-by: Arnd Bergmann --- kernel/sched/fair.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e30dea59d215..27928809e6ed 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -110,14 +110,6 @@ int __weak arch_asym_cpu_priority(int cpu) unsigned int sysctl_sched_cfs_bandwidth_slice = 5000UL; #endif -/* - * The margin used when comparing utilization with CPU capacity: - * util * margin < capacity * 1024 - * - * (default: ~20%) - */ -static unsigned int capacity_margin = 1280; - static inline void update_load_add(struct load_weight *lw, unsigned long inc) { lw->weight += inc; @@ -3046,6 +3038,14 @@ static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq, int flags) } #ifdef CONFIG_SMP +/* + * The margin used when comparing utilization with CPU capacity: + * util * margin < capacity * 1024 + * + * (default: ~20%) + */ +static unsigned int capacity_margin = 1280; + #ifdef CONFIG_FAIR_GROUP_SCHED /** * update_tg_load_avg - update the tg's load avg -- 2.20.0