From patchwork Mon Dec 10 21:01:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 153358 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4008032ljp; Mon, 10 Dec 2018 13:02:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/VYbGW8PuIJkAbqGMtN2CxPC14koJJ0wQYoHb50CseTgAyYbIYOzAQ/c2qF/x3mp3q7PsGk X-Received: by 2002:a62:5b83:: with SMTP id p125mr13937271pfb.116.1544475726250; Mon, 10 Dec 2018 13:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544475726; cv=none; d=google.com; s=arc-20160816; b=BMNbPcnYT0hVIj+bgM41Lv9svDoljSVzByaGdG6AryLKkqzMcnyOXVYIyBHqTcHW0x qetY8ozO9sRAsJWB8CTBgRBUn/ALhVmQvQTt21RCuYLR7xuUBtF6NsRv9wjDkw+qcxsp JQXFzQHStNKyj4G4zeurVNswLmSqgoInJkVvq0Kbbr+JUE2EzzIwhptOEmWcjjj2QjaK NixjhYkKuMxIBdHM1lucQDdsYb+lRqfhs4A9W3SqkK0+7np0TvsYZ5J9qgzgQq6mMPur wA2GLJRhv1o2CTYpLwlt4WckrKIhEcbuwBcOuNJnfYS5/++KLe0Nt9Ibsvsbi5QexuVf XZXw== 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 w12si9988602pgl.122.2018.12.10.13.02.05; Mon, 10 Dec 2018 13:02:06 -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 S1729738AbeLJVCE (ORCPT + 31 others); Mon, 10 Dec 2018 16:02:04 -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 X-Provags-ID: V03:K1:sFhP/E00aT2yakrdFlzHmg5gy3p+lzmEJNGvUoKaL8L2rNWrfT2 KJjxIYF1eHYECe37uaDuq4URjU4insTc5/Jqc1g6daQtqzWv8jGuSWVsIC5JiX7lH/MzXT5 43e05NtIVMsT4qq1V4WQ9nHo3/qcwPjAI6cd/ITySPFbxXkXako3VVhdUko2WEDkJhHA/rz aThVmfm0jgk6c7i89vPhw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:MnfSm3sZS00=:pLuQrK5BQHvbE646FlaG/Q 9eMzmVxEf5skaHAZZIXKDde27FHUwOh3PRLsZaRkf2H+6EJGLFktC+adR/0AF0kUdXhgMldxa 5j3fpb5z/zipNEz8O78kX0Et6HVkmKaf0ulGt5slPkL2xqAoxB6T4EuNfvVbeo9jCA1j0kiFE 1Nz9lfSgZ9miiJZ0EVA7PXDBEGcaAozcxLHl8xCqnl/PtF8G1sZQuftmVsmMnwWLAD4k3iiUt OgfXw7KGNg1VlESJbWLS/4hQ2CAN93rJiCaDMlgMPAdhySTJAnKmPC6wK3CGQTy9FfuHnXjj5 hjRM1yX12Y4YqvDZ+9qLch/ftVfg6W18iKO1iXMfKVL+fRoX/GojWCJy+LRgD2VNKIDpJ8GAT hNNMez4ldnewuE+v7ku8WTjMO5XVOJgQsoU2QPVHEu1LZBQ863+toKz/Svrf488GhTD3hn5kN nIbHjBdhIIkS9TqCb1JixxA2VCsn55CT0swdmLQuIYI3NBRmIupRNLIVrR5+3X+I5JQq7f7E3 d8mO+zx2RxPo8wABPU+zpE4t1gfBXfDwMd9WBcS2vJDhTiYFkh31S8xZB1OZ+WzV3Tug4AMDL WuDxf0cysl7PJGBEJvAes+TSe1hPUXbZeBNvAXXGwbECsJ9DduScD1oCDvhG/1ZS8B7iVOZQS BINMN8fB61Alk7TusKMP1XDOhdnQp3iwbWQqzB6forHkHfiOq1dQNHiAcXg7n8T/h/+3gGR7v lQCLvSX0KNHHiEMQ/G3Ystdkj5ZvduyQDxxQyg== Sender: linux-kernel-owner@vger.kernel.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(-) -- 2.20.0 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