Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp763984ybi; Fri, 21 Jun 2019 07:48:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzH8NwZyFuuB+zx061TOkpW1M/xz7lKcaeiDTcqChvDF8EygieeugllIrolSJYRvJhkVMHu X-Received: by 2002:a63:c20e:: with SMTP id b14mr18174159pgd.96.1561128513637; Fri, 21 Jun 2019 07:48:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561128513; cv=none; d=google.com; s=arc-20160816; b=MCjIH7MLvWITnBdsgirPHaSAc8OOImzDZETLzUEdOQNmpXASfxcXJHTdQph8Z5BC/0 OUFFE6nVaxXoive5stFnRcv4IEwDnyvRC5vfPcfMVdlUofdrC2SycAftKJEq+Sn09j6c W097PIhQ5IH6KrsIXWqEhESuA96m0x+osY5oUXoMXk7lxmXSYVVhGDwqPjTtTRxwHSaf io+s/ZQyJAsaI8LfH62sN6PcL8MujM5bRjyLU8cgZNkiXGaD472JJb9+HZC/hsRR/F4r nyzGAIv8LplKnX/CApq0N8gufcGsgl1WIvEivj0gFmG+47XaDTN4tcAxMGURXNiJ5XBb u0JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dNLU1mioHBLMZ0p6Ve9rpIAVxXOX351gaLmWi3SeRww=; b=OvaT4xk9PpiDrqtPREye9eyIPxYIAWwMHxpNCy/Iafx0BUmRish5xLexnsPOd9MS13 GaH0aGatB5iVz/ndmc25XgRke/HCddEjSVPpZD7Wtq60xZk1zC0UVRqHk6Q6HkwQyvM/ 6F/aP2grlKPawoVf2GelBispCkoZlPkV7DV5QqNEVbipAcaYoREQ1mpCMS5RixluorHZ KVKEWoOMxAPB6P/HSEMW/CF3wBSUBrG3aKF96BUq56b/UrUIMtgCi53dzgD3YgNZT1/B EkxKwi6glpfRJKJfp/Lk2yj1M/BZQI6l5NFdCITMSMFh9MwDbo8KeErST83KNvAaMYHn xCCQ== 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 k5si2766774plt.355.2019.06.21.07.48.17; Fri, 21 Jun 2019 07:48:33 -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; 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 S1726355AbfFUOrW (ORCPT + 99 others); Fri, 21 Jun 2019 10:47:22 -0400 Received: from foss.arm.com ([217.140.110.172]:33752 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfFUOrV (ORCPT ); Fri, 21 Jun 2019 10:47:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BBBA528; Fri, 21 Jun 2019 07:47:20 -0700 (PDT) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 82AD93F575; Fri, 21 Jun 2019 07:47:18 -0700 (PDT) Date: Fri, 21 Jun 2019 15:47:16 +0100 From: Patrick Bellasi To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Tejun Heo , "Rafael J . Wysocki" , Vincent Guittot , Viresh Kumar , Paul Turner , Quentin Perret , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle , Suren Baghdasaryan , Alessio Balsini Subject: Re: [PATCH v10 11/16] sched/fair: uclamp: Add uclamp support to energy_compute() Message-ID: <20190621144716.2322iylanmvwja5c@e110439-lin> References: <20190621084217.8167-1-patrick.bellasi@arm.com> <20190621084217.8167-12-patrick.bellasi@arm.com> <20190621140128.GL3436@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190621140128.GL3436@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-Jun 16:01, Peter Zijlstra wrote: > On Fri, Jun 21, 2019 at 09:42:12AM +0100, Patrick Bellasi wrote: > > > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > > index ce2da8b9ff8c..f81e8930ff19 100644 > > --- a/kernel/sched/sched.h > > +++ b/kernel/sched/sched.h > > @@ -2322,7 +2322,6 @@ static inline unsigned long capacity_orig_of(int cpu) > > } > > #endif > > > > -#ifdef CONFIG_CPU_FREQ_GOV_SCHEDUTIL > > /** > > * enum schedutil_type - CPU utilization type > > * @FREQUENCY_UTIL: Utilization used to select frequency > > @@ -2338,15 +2337,11 @@ enum schedutil_type { > > ENERGY_UTIL, > > }; > > > > -unsigned long schedutil_freq_util(int cpu, unsigned long util_cfs, > > - unsigned long max, enum schedutil_type type); > > - > > -static inline unsigned long schedutil_energy_util(int cpu, unsigned long cfs) > > -{ > > - unsigned long max = arch_scale_cpu_capacity(NULL, cpu); > > That conflicts with the patch I have removing that NULL argument, fixed > it up. Ok, I notice only know you have this: commit 119fd437f412 ("sched/topology: Remove unused sd param from arch_scale_cpu_capacity()") from Vincent on your queue. :/ > > +#ifdef CONFIG_CPU_FREQ_GOV_SCHEDUTIL > > > > - return schedutil_freq_util(cpu, cfs, max, ENERGY_UTIL); > > -} > > +unsigned long schedutil_cpu_util(int cpu, unsigned long util_cfs, > > + unsigned long max, enum schedutil_type type, > > + struct task_struct *p); > > > > static inline unsigned long cpu_bw_dl(struct rq *rq) > > { > > @@ -2375,11 +2370,8 @@ static inline unsigned long cpu_util_rt(struct rq *rq) > > return READ_ONCE(rq->avg_rt.util_avg); > > } > > #else /* CONFIG_CPU_FREQ_GOV_SCHEDUTIL */ > > -static inline unsigned long schedutil_energy_util(int cpu, unsigned long cfs) > > -{ > > - return cfs; > > -} > > -#endif > > +#define schedutil_cpu_util(cpu, util_cfs, max, type, p) 0 > > Was there a good reason for this to be a macro and not an inline > function? Mmm... not really, apart perhaps saving some lines. I notice sometimes we use macros (e.g. perf_domain_span), but it's certainly not the most common pattern. > I've changed it, if it explodes in 0day, it's all my fault ;-) Sure, I guess if 0day explodes will not be for that change. :) -- #include Patrick Bellasi