From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D615DC433E0 for ; Mon, 8 Feb 2021 19:10:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90C0D64D92 for ; Mon, 8 Feb 2021 19:10:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231585AbhBHTKr (ORCPT ); Mon, 8 Feb 2021 14:10:47 -0500 Received: from foss.arm.com ([217.140.110.172]:39190 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234365AbhBHRuA (ORCPT ); Mon, 8 Feb 2021 12:50:00 -0500 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 A75101042; Mon, 8 Feb 2021 09:49:10 -0800 (PST) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4997E3F73D; Mon, 8 Feb 2021 09:49:09 -0800 (PST) From: Valentin Schneider To: Vincent Guittot Cc: linux-kernel , Peter Zijlstra , Ingo Molnar , Dietmar Eggemann , Morten Rasmussen , Qais Yousef , Quentin Perret , Pavan Kondeti , Rik van Riel Subject: Re: [PATCH 3/8] sched/fair: Tweak misfit-related capacity checks In-Reply-To: References: <20210128183141.28097-1-valentin.schneider@arm.com> <20210128183141.28097-4-valentin.schneider@arm.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Mon, 08 Feb 2021 17:49:00 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/21 16:29, Vincent Guittot wrote: > On Fri, 5 Feb 2021 at 21:07, Valentin Schneider > wrote: >> >> Perhaps I can still keep 5/8 with something like >> >> if (!rq->misfit_task_load) >> return false; >> >> do { >> if (capacity_greater(group->sgc->max_capacity, rq->cpu_capacity)) >> return true; >> >> group = group->next; >> } while (group != sd->groups); > > I don't catch what you want to achieve with this while loop compared > to the original condition which is : > trigger a load_balance : > - if there is CPU with higher original capacity > - or if the capacity of this cpu has significantly reduced because of > pressure and there is maybe others with more capacity even if it's one > with highest original capacity > If we had a root-domain-wide (dynamic) capacity maximum, we could make check_misfit_status() return false if the CPU *is* pressured but there is no better alternative - e.g. if all other CPUs are pressured even worse. This isn't a correctness issue as the nohz load-balance will just not migrate the misfit task, but it would be nice to prevent the nohz kick altogether. I might ditch this for now and revisit it later. >> >> return false; >> >> This works somewhat well for big.LITTLE, but for DynamIQ systems under a >> single L3 this ends up iterating over all the CPUs :/