Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp363242imu; Mon, 10 Dec 2018 23:48:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/U+fW8HNFS3zWKSiue5xvewMet0phNuiBNOLt6A1FcgNFvJUmA5Poc79sLvrnOCF8ZFtPvr X-Received: by 2002:a17:902:4222:: with SMTP id g31mr15001947pld.240.1544514480502; Mon, 10 Dec 2018 23:48:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544514480; cv=none; d=google.com; s=arc-20160816; b=VevrTOHe1FLJKJFmpsq6DCiMrEWUQ3jfIXIrSE0hgRuJT47sai7PbpcTCuq3YE4UcO YvpKTRePXIlHNFdxP/LAa1MgrHTRa59HKHoz56uyErnaugdqbT3k3Vh8ujAZKXStXx03 eiGb9rGg0t00uTaNRgTd7k484WHAJSThrGtGQnxE6/nziRl1cCRNJ09r+KZ0eSVB75F1 TjJmGtDycquJwme6NXUYqkJvyPP+5DsFpKVLidhfm/Us7l9hDgLNc7z3Tpf96KPc7JZS KmPHCvPpzpBph0cVlc+wDW7dIlFgFQg6hGXI1YA1OhW7TZn8ZgGg0o+CxmfUZ8PMbkUF oswg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3AhxpeOqpWnyFViFDItH8CiCNbu5SMJal2oVMCV4pbg=; b=EwreY4kwQvDn5McoeKFuYwV6p4DIIs3VDJr4WXKi7T8uAhQ/iy3GBEEu3+5zBLyOlt jxlpzP4Zm9JMqbJAI2p8+zleCQUg9ZYz6qCR+08qVNLwNWUAxNsS4bXZunV8aQhqwjcY UyQOLndPn0RSZKW58Hq7ptIxIbV0fjuEcba26D9wOby1GoEYthH7/C253yUpgKxuZUcU 6zTDxTlelT14dKUBgs4o9WNaAtUzzNDIONsz6QJJPQS5QukvVOU3OwxbWO6jPXNe/CjM R/0Xzz72LFxA9E6mvetpMACyabJzsdgRHWnFxHcRH4dlKjPkfEJjKRynDlGOTWvRpIqc oXdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LiG2mHX5; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39si12165683plg.315.2018.12.10.23.47.45; Mon, 10 Dec 2018 23:48:00 -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; dkim=pass header.i=@linaro.org header.s=google header.b=LiG2mHX5; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726126AbeLKHqc (ORCPT + 99 others); Tue, 11 Dec 2018 02:46:32 -0500 Received: from mail-it1-f193.google.com ([209.85.166.193]:38446 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbeLKHqb (ORCPT ); Tue, 11 Dec 2018 02:46:31 -0500 Received: by mail-it1-f193.google.com with SMTP id h65so2250928ith.3 for ; Mon, 10 Dec 2018 23:46:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3AhxpeOqpWnyFViFDItH8CiCNbu5SMJal2oVMCV4pbg=; b=LiG2mHX5Od8Q/LQ4ZTjckNK+y1vp1KT0X/VnWm3eQUqkFwh7uONktYzWUvMNpvgYcc lhkLhdrz5E9MnrBDtgNQ5RdutMtMnbgTXcaeGr+Qmk4NNNHPIgVEE374EhgBz6yq0Q+C SB76923dmg5DDObTtp/pAX48r+Yr88PM6P9o8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3AhxpeOqpWnyFViFDItH8CiCNbu5SMJal2oVMCV4pbg=; b=gcQyCATBnjv+t72NihZAUMp+KDuih68bBspqdl8B6mGHY7jNdlqlo2Y2xV/yvW500y iQ1qP6jsc2vUAvdbMzHWCPhvTaF9Mf1TT2rkFtM+DaujkTQhSKQsEXmMBiocyngbzYne 5L9ryI9Kkfe4CN7MmS8f7X/IFoxuZz4UIkgfncr8ibLKsTeaZZkj0Nc6BoGcLQEJAfhU ABppG4/j1MhPodKXfhwHnIay3o7+Lt8VWlCJeJWRQTpPZ7xmsSov0ynXMQnWCJEFwxx8 tbnmqyDdhrkPY2np9tJEz/c+Kty23WIu2qOdfJZIOaSOQOxx7FBUrYRx68Cq/oJFzERc LhTg== X-Gm-Message-State: AA+aEWYDc3aIAhUOLJdablw0q1gnWrDcLOAoDiB7i4sZRJNAhNqY0saS f/Slth0qATyQS9sU0zs0qhXJXKzoHVOeTsd9eDeAgg== X-Received: by 2002:a24:6f42:: with SMTP id x63mr1319531itb.152.1544514390569; Mon, 10 Dec 2018 23:46:30 -0800 (PST) MIME-Version: 1.0 References: <20181210210139.3336002-1-arnd@arndb.de> In-Reply-To: <20181210210139.3336002-1-arnd@arndb.de> From: Vincent Guittot Date: Tue, 11 Dec 2018 08:46:19 +0100 Message-ID: Subject: Re: [PATCH] sched/fair: move capacity_margin definition into #ifdef To: Arnd Bergmann Cc: Ingo Molnar , Peter Zijlstra , smuchun@gmail.com, Morten Rasmussen , Mel Gorman , Srikar Dronamraju , Patrick Bellasi , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Mon, 10 Dec 2018 at 22:01, Arnd Bergmann wrote: > > 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; Olof sent a similar patch 2 weeks ago: https://lkml.org/lkml/2018/11/26/115 Vincent > > 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 >