Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965555AbcCPWMo (ORCPT ); Wed, 16 Mar 2016 18:12:44 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:34163 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934707AbcCPWMm convert rfc822-to-8bit (ORCPT ); Wed, 16 Mar 2016 18:12:42 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Steve Muckle , peterz@infradead.org, rjw@rjwysocki.net From: Michael Turquette In-Reply-To: <56E8CA8B.8080506@linaro.org> Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Juri.Lelli@arm.com, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, vincent.guittot@linaro.org, "Michael Turquette" References: <1457932932-28444-1-git-send-email-mturquette+renesas@baylibre.com> <1457932932-28444-3-git-send-email-mturquette+renesas@baylibre.com> <56E8CA8B.8080506@linaro.org> Message-ID: <20160316221236.11016.51095@quark.deferred.io> User-Agent: alot/0.3.6 Subject: Re: [PATCH 2/8] sched/fair: add margin to utilization update Date: Wed, 16 Mar 2016 15:12:36 -0700 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 25 Quoting Steve Muckle (2016-03-15 19:52:59) > On 03/13/2016 10:22 PM, Michael Turquette wrote: > > +unsigned long cfs_capacity_margin = CAPACITY_MARGIN_DEFAULT; > > + > > #ifdef CONFIG_CFS_BANDWIDTH > > /* > > * Amount of runtime to allocate from global (tg) to local (per-cfs_rq) pool > > @@ -2840,6 +2853,8 @@ static inline void update_load_avg(struct sched_entity *se, int update_tg) > > > > if (cpu == smp_processor_id() && &rq->cfs == cfs_rq) { > > unsigned long max = rq->cpu_capacity_orig; > > + unsigned long cap = cfs_rq->avg.util_avg * > > + cfs_capacity_margin / max; > > Doesn't rq->cpu_capacity_orig get scaled per the microarch invariance? > This would mean that the margin we're applying here would differ based > on that. > > I'd expect that the margin would be * (cfs_capacity_margin / > SCHED_CAPACITY_SCALE) which would then reduce the division into a shift. Will fix. Thanks, Mike