Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4241406pxb; Mon, 8 Feb 2021 11:13:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwi1fKENZumTpNQGE0uF3XGqMYrItPzJ7AxOg1k3tRxLznqdV98KyUa1XDceatfuR6vJdlt X-Received: by 2002:a05:6402:105a:: with SMTP id e26mr16531372edu.60.1612811614205; Mon, 08 Feb 2021 11:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612811614; cv=none; d=google.com; s=arc-20160816; b=uCmebt9hZRC8AZtNQ99mfOjQkPjPkx7ngUjv9gBlE7TdZIbJ59m80dgkmr4CcsLce1 1yqCUNhl2JuPqK8Z1I273ISCLvxbMk02pq9POJjIu+sQMRQ5zUw9SG5wFcwzpEoJeQnG zOhs5M9rGGWs92Keuh1nSJbqb1WOzU2jCLHSkJMcjuCqpeK5gIND7+fi+Ug4llkLwmRC rVR68z1ez7ThtdUyIs/PJwfaXRePCev5BtjSxAsg90puEoaxKPcdDcJcyezZuMuCInHu zqNcszoEW4uwxJmRhryr0d/BrIKl/zlxBRbxcIZyhtouX0gYVq2xle5g5xrXYKVo7qhI c1Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from; bh=muE80R6QCIDeVxyRoy0QlCtLAQzrDBvoKmPMhVRoYbw=; b=OJ2S47THaEDn2wz43wssmbwnTyde0q6EDQ9IQ1rLJxTvRXsszPkrkLoMK0vVoGFu9R Rk/qOyYRmlR2ffdI2rX1dwTkFI/3JyDtA2iWzJOtKns7kxNJeOEhMUbJ5Fp36QTydm01 KervJWsYAE+baEVYSCNSti+cYactE5NJWSJ2cw5WCwF50UmHAQcKatZ6FKnUnqwHeiNr 8GTawTGMrIp1C8JSQghvS6axDBkVpUAPaKDo1gywDC+VKIRxgg7O8ZwFnoMzKf45/mS0 3pIdzcP/5HFjFyOo52Tzna/Hqw1hQG9fKnokup2iaXZWXXB3EE7mTHJWAksXZT5fORQC 73Aw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si12436947ejf.718.2021.02.08.11.13.10; Mon, 08 Feb 2021 11:13:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235996AbhBHTKe (ORCPT + 99 others); Mon, 8 Feb 2021 14:10:34 -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 :/