Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2119450pxb; Fri, 5 Feb 2021 09:22:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuRx7Ej3lJgkyCTjWHS8o/9U73uRAXz5IWazZccIDQCruaFHyuYAQIjbTIHvk1uh8R1GH/ X-Received: by 2002:a17:906:1a0c:: with SMTP id i12mr4810483ejf.276.1612545748416; Fri, 05 Feb 2021 09:22:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612545748; cv=none; d=google.com; s=arc-20160816; b=rREObciEtCu3BnwYSk1Fv+pFK6uivBuCJ8YPKk4Yt7w+aDvyjUwBro/3tGcKb7tKZ5 LH5TamIXDgG+oIpzj9Jr3hKwP+A/LiQZbGPH9KCocRyZpE3ZaTcKpJRbRKHuwepBkVms Bld+tQ1UmmshzjYJqXTgHkWKNqmF+urdJ8eqVloCHQsLeU+TlIkKmOTBWQ8M+9o/I0SX G0kdpxB1uovOPQOtuqaNeitfz6m70jeROxHDvcpv7Bbmskw9j7ttTFN98ZlNe38RPkjO lipSGDnnqmOKqvYAP3xbkPZybxnMopqYsUPz4Ti6p9CvpmbCkDQwJmsjxIySIqIv9B8X GYGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ETEu8SRiv768wD9x6Q9hbqdexnK90s+WagGrWdw7ytU=; b=kipY1+O3DyLzCx8NhoobDezL3veiO9KVl6tHLrKfITGPhoFx2J9rvpFdcfHSZvVfgh 0q1oWYDEFBd/6XU1wQz1Ej7ixuA9y8xzJrXTv4ix9VQiWHAyKJKoCMY8eF+OCyhR9Air Nq0rcLlF7NUzdjZwh7JkOh0vCZoEEn7mj6YSL3lgzgt8MNI5Mljs7Oki9xr7zgUuqJyQ XwgSvW3mQeYTSyRBEcP6pQ+JG1SXbD+0Mwk1pghV0XocUyH3blOl5SsikV9lIryMksEV kF29eeXuzYJkYliou4NSOHWnBgpXp3Q26dzsl0HBxuF71rkEUD/dNNfRjJgKt62xUqrp yKdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="aelE/Iy+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h20si1727262ejy.576.2021.02.05.09.22.01; Fri, 05 Feb 2021 09:22:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="aelE/Iy+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233260AbhBEPi1 (ORCPT + 99 others); Fri, 5 Feb 2021 10:38:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233166AbhBEPgU (ORCPT ); Fri, 5 Feb 2021 10:36:20 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92C6FC061574 for ; Fri, 5 Feb 2021 09:18:01 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id v15so8580536ljk.13 for ; Fri, 05 Feb 2021 09:18:01 -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=ETEu8SRiv768wD9x6Q9hbqdexnK90s+WagGrWdw7ytU=; b=aelE/Iy+SRzQrWieFDYZWj/zHe0/VVqulpFVQOh+3ux64+/1nLCa4N7eRQ1mphTG4A SF1+eQ3ixfZD8ZtF6AZda6qa9YGHvCC0qY+X9SPEFkepvuQl2L8BU7PILJazNDXWvlu9 AEHo81g6BtQ9EzRcRBs7K+Ecq5fY+nBzwZMNeg1CsygWvSAtGmqdYlz1axQ4PW2HWjwm oXIHhuXWBuuZDwAcQkuJ710ljsIDO2Cvx/2pyObed2RjGIdU21GmZ3/ahTnUE16Sqv5Y lz1wtKVxkcDrZOJBEbtrnCqc0tUHJFPNeBd0S0FetWIpkgtCcWXjLKN6LoIbZuC2O5ZF Xxyw== 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=ETEu8SRiv768wD9x6Q9hbqdexnK90s+WagGrWdw7ytU=; b=e4WryDDGvZeMVsGfSH/Fmq1fhTQ10NYcoOXUSDRmfUdjO8U4WxsyoB9WGWmyddnpp8 H+vRG5YdeEqjMiIGPZP1aFVebkQbKgOsiaP8OXjL2Q+56yai8rcrn7gft2r8ZjpJ/WM5 x6QBRwxwB9sxMHad+Y2tN26F/aGxMGpQq3yd7PXTEbSFzbFg0piz7DCS2173BnCH9ie9 bIgSxxouLvHfoOWmRtFNRNfTBNMEdHMeQKIAhD0uwGEKff8/aWSRWysoqcptd5NYRg7j nllASvJHSMIHwMtIFiYrFcQW4Na8j3PeXrpdKaSvCSVol22Yg7WMw2OjIRSp74pyUkQe pjwA== X-Gm-Message-State: AOAM530yiGrObluHnW7+AdNy6h9zs1g1yQmzJ3lMLoDlzQLSyoFG9eDI CfXReXwDjHlkgjJvSi1pORXJ0Omfq8LuN/YP1VW7rQ== X-Received: by 2002:a2e:b354:: with SMTP id q20mr3202243lja.445.1612545480076; Fri, 05 Feb 2021 09:18:00 -0800 (PST) MIME-Version: 1.0 References: <20210128183141.28097-1-valentin.schneider@arm.com> <20210128183141.28097-4-valentin.schneider@arm.com> In-Reply-To: From: Vincent Guittot Date: Fri, 5 Feb 2021 18:17:48 +0100 Message-ID: Subject: Re: [PATCH 3/8] sched/fair: Tweak misfit-related capacity checks To: Valentin Schneider Cc: linux-kernel , Peter Zijlstra , Ingo Molnar , Dietmar Eggemann , Morten Rasmussen , Qais Yousef , Quentin Perret , Pavan Kondeti , Rik van Riel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 5 Feb 2021 at 18:00, Valentin Schneider wrote: > > On 05/02/21 15:31, Vincent Guittot wrote: > > On Thu, 28 Jan 2021 at 19:32, Valentin Schneider > > wrote: > >> > >> During load-balance, groups classified as group_misfit_task are filtered > >> out if they do not pass > >> > >> group_smaller_max_cpu_capacity(, ); > > > > group_smaller_max_cpu_capacity and group_smaller_max_cpu_capacity are > > removed in the next patch. Merge this and the next and directly remove > > them > > > > OK. > > >> @@ -8253,7 +8260,7 @@ check_cpu_capacity(struct rq *rq, struct sched_domain *sd) > >> static inline int check_misfit_status(struct rq *rq, struct sched_domain *sd) > >> { > >> return rq->misfit_task_load && > >> - (rq->cpu_capacity_orig < rq->rd->max_cpu_capacity || > >> + (capacity_greater(rq->rd->max_cpu_capacity, rq->cpu_capacity_orig) || > > > > Why do you add a margin here whereas there was no margin before ? > > > > Comparing capacities without any sort of filter can lead to ping-ponging > tasks around (capacity values very easily fluctuate by +/- 1, if not more). max_cpu_capacity reflects the max of the cpu_capacity_orig values don't aim to change and can be considered as static values. It would be better to fix this rounding problem (if any) in topology_get_cpu_scale instead of computing a margin every time it's used > I'm guilty of doing two things at once here: replace existing users, and > convert callsites that should be existing users. I can split the conversion > in a separate patch.