Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp914469iog; Wed, 29 Jun 2022 12:52:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tlvh7MwnspfrGpuSRaschAbKkqzDlgNdD5o+1irsntltwpmMiF8kV2AbFBTAhlGqQazouk X-Received: by 2002:a17:902:f68a:b0:16b:a762:9735 with SMTP id l10-20020a170902f68a00b0016ba7629735mr2022298plg.23.1656532371093; Wed, 29 Jun 2022 12:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656532371; cv=none; d=google.com; s=arc-20160816; b=0E8CqmJM7WB1lQ8bwUPv8jMNPEcL91PGrmHrHBQNIk8nqD63cykMWb/lIP7PmOxh4n Y0cYYwFVM/Ww8YQerfO7kYWSOSF0vzFGSa0gftujpgVKxuH3WBqlohszmgO62oo2bbpP LBM6XmElE6ZB94OqJswQPE8VnJmN7zRbbAid7bxjDA7S7pcOiVUn/mnrQwn4GaggkNl8 JI2cVzr+iMjQpjN75RyL20RVufRnGPBHbKbZ4JBQ15fQ/30dXI4+3yJoDY1WG3slrtYh 243H+9E+Mdsce5fvaVUC+PjYiLwEhls0ws37ti2EKXyHuWsRmHwESxH4Spzn9wDgqzXD 5XzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=/fqacw9fJkt8Ajfm+D7rR1gVi9CmeQ8q5YCv8z9gZjI=; b=eBLnluu6mnixYVZpBATPavePEASYkW9XuRjeIl04jUBbRsTRiLTss8VE0Tyd+IBQC4 OwPpm51BBU/8KVFem4WGKKOxo4MX1hDGUBkQ7HsNBjL5kBzsPfxljFw3wpVkD/8aTjKI ykwJCyOkLJAm2Qdfu5kikxwSa8z0+VEoc/U/qdKf0giOENSMTFZgcTs2psgr56zLUOO1 5KgrbK2XBEDyCxL3YEuUFnFI5hKdQgd2yxMrPxDmr35oUBBvlkxBBfzQKDHQmlBg2ZBa EYDJEwPctNF9pqUjUv05sRjt0IkBCqJ3GjaJJ8Jh72LDPuo0aFYgOm+jPfW1YcuOFh78 hw/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a056a00134c00b0052563911143si17528080pfu.211.2022.06.29.12.52.39; Wed, 29 Jun 2022 12:52:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231325AbiF2Tr4 (ORCPT + 99 others); Wed, 29 Jun 2022 15:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbiF2Trz (ORCPT ); Wed, 29 Jun 2022 15:47:55 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4CAD33A1AD for ; Wed, 29 Jun 2022 12:47:54 -0700 (PDT) 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 4C7241480; Wed, 29 Jun 2022 12:47:54 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.197.38]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C830F3F792; Wed, 29 Jun 2022 12:47:52 -0700 (PDT) From: Qais Yousef To: Ingo Molnar , "Peter Zijlstra (Intel)" , Vincent Guittot , Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, Xuewen Yan , Wei Wang , Jonathan JMChen , Hank , Qais Yousef Subject: [PATCH 0/7] Fix relationship between uclamp and fits_capacity() Date: Wed, 29 Jun 2022 20:46:25 +0100 Message-Id: <20220629194632.1117723-1-qais.yousef@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Relationship between uclamp and fits_capacity() is currently broken. Mostly due to how uclamp should interact with migration margin and capacity pressure. But also due not all users were converted to consider uclamp before calling fits_capacity(). Namely cpu_overutilized(). The meat of the series is patch 1 where we introduce a new function, util_fits_cpu(), that takes uclamp into account. The new function should replace all call sits to fits_capacity(), which what subsequent patches do. Except for patch 7 where we fix handling of early exit condition in find_energy_efficient_cpu(AKA feec()) that must be uclamp aware too. util_fits_cpu() will revert back to a simple call to fits_capacity() if uclamp is not being used on the system. Qais Yousef (7): sched/uclamp: Fix relationship between uclamp and migration margin sched/uclamp: Make task_fits_capacity() use util_fits_cpu() sched/uclamp: Fix fits_capacity() check in feec() sched/uclamp: Make select_idle_capacity() use util_fits_cpu() sched/uclamp: Make asym_fits_capacity() use util_fits_cpu() sched/uclamp: Make cpu_overutilized() use util_fits_cpu() sched/uclamp: Cater for uclamp in find_energy_efficient_cpu()'s early exit condition kernel/sched/core.c | 10 +- kernel/sched/fair.c | 256 +++++++++++++++++++++++++++++++++------- kernel/sched/sched.h | 53 ++++++++- kernel/sched/topology.c | 18 +-- 4 files changed, 275 insertions(+), 62 deletions(-) base-commit: 70fb5ccf2ebb09a0c8ebba775041567812d45f86 -- 2.25.1