Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934302AbcCPCxG (ORCPT ); Tue, 15 Mar 2016 22:53:06 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:34695 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753279AbcCPCxE (ORCPT ); Tue, 15 Mar 2016 22:53:04 -0400 Subject: Re: [PATCH 2/8] sched/fair: add margin to utilization update To: Michael Turquette , peterz@infradead.org, rjw@rjwysocki.net References: <1457932932-28444-1-git-send-email-mturquette+renesas@baylibre.com> <1457932932-28444-3-git-send-email-mturquette+renesas@baylibre.com> 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 From: Steve Muckle X-Enigmail-Draft-Status: N1110 Message-ID: <56E8CA8B.8080506@linaro.org> Date: Tue, 15 Mar 2016 19:52:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1457932932-28444-3-git-send-email-mturquette+renesas@baylibre.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 812 Lines: 19 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.