Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4548562rdb; Tue, 12 Dec 2023 02:46:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0ey5zt4tYcB0wVCHURNP9ehojymAM6lGQmnBVBlYPm5SUZn/8mu8NwdB8Mu00FbpOH7Cw X-Received: by 2002:a17:90a:898c:b0:28a:325d:1ed3 with SMTP id v12-20020a17090a898c00b0028a325d1ed3mr2707875pjn.2.1702378014339; Tue, 12 Dec 2023 02:46:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702378014; cv=none; d=google.com; s=arc-20160816; b=duieeYcj7chHLQcObZWgAmL68Y53rawPROasPiyhObJyXQNszyivpZD1N8h+hVxBTA sWV/84z3/XpWgvtas26Kz2HzrmRlqXPfVJLHOMM+6Q6naFXJ5fbnxRsySPOJEZJRabvj QYsGgfQAWRMkr4XEsbVNIR+3KkXlHKpjIFwn3Wo0U8LtUZeJgfpCv6zj4bhiF2hJXtsq xLnIf/EdYHXhoxmMWxle62safg6sxUGul5W0nI56ITX3PfLGhGCzB96guTdujJa7T1LV Pn1jsJOrQd1T7kLqzcttZUMzauTYq8r7kFf49eypwhhx7usbspmxXGX1u/oEtRF+0X0p TaOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=BSEGo0XM0kmP7KcSQD8PB4414pNLzyYS2TPKngeSNsc=; fh=/ceuorJ3WDHm5q3w/aEXghksJqnCY3OFX3jGl7yowT4=; b=ZPxX9g7K4ouujGZEEUVDrktkLeZPVgcTRnFIy0dE8GWwKqwfwZMQhqZUFExSsgnRW8 jFw+fns+nuuWpFbL6OO5vKBl11Pdb83rzJbEscQvySqWz0NCU0Mr55x3ILviL0z1FVoW 0/u/IHztoBClCUGc1DYj4nyhIDImLL+3+m4WESWO8xvQDiy14Q6Hpt/GIl1vxnq7t48g tRbKnL2bDRBE9rG2UcPr3DF93RCqicnMDoJU3wWCei/B0np1lcCcu8igG4kaC2CoZlj5 p8F6aUNiKx+8olKb2wgOV6q44ZUQq16L8CTtz3A545TczxSkBFoGTMje+kKsBTCkwxzb r4pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id pf4-20020a17090b1d8400b00286f88ca29dsi7913076pjb.36.2023.12.12.02.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 02:46:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 134A7808BDA4; Tue, 12 Dec 2023 02:46:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232043AbjLLKqi (ORCPT + 99 others); Tue, 12 Dec 2023 05:46:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjLLKqh (ORCPT ); Tue, 12 Dec 2023 05:46:37 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 632299F; Tue, 12 Dec 2023 02:46:43 -0800 (PST) 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 51BF5143D; Tue, 12 Dec 2023 02:47:29 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 995873F762; Tue, 12 Dec 2023 02:46:40 -0800 (PST) Message-ID: <47ef274b-d9cc-4f4f-8134-2dced46005fa@arm.com> Date: Tue, 12 Dec 2023 11:46:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] sched/fair: Be less aggressive in calling cpufreq_update_util() Content-Language: en-US To: Qais Yousef , Ingo Molnar , Peter Zijlstra , "Rafael J. Wysocki" , Viresh Kumar , Vincent Guittot Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Lukasz Luba , Wei Wang , Rick Yiu , Chung-Kai Mei , Hongyan Xia References: <20231208015242.385103-1-qyousef@layalina.io> <20231208015242.385103-2-qyousef@layalina.io> From: Dietmar Eggemann In-Reply-To: <20231208015242.385103-2-qyousef@layalina.io> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 12 Dec 2023 02:46:51 -0800 (PST) On 08/12/2023 02:52, Qais Yousef wrote: > Due to the way code is structured, it makes a lot of sense to trigger > cpufreq_update_util() from update_load_avg(). But this is too aggressive > as in most cases we are iterating through entities in a loop to > update_load_avg() in the hierarchy. So we end up sending too many > request in an loop as we're updating the hierarchy. But update_load_avg() calls cfs_rq_util_change() which only issues a cpufreq_update_util() call for the root cfs_rq? So the 'iterating through entities' should be for a task in a non-root taskgroup which the condition (1) takes care of. cfs_rq_util_change() ... if (&rq->cfs == cfs_rq) (1) cpufreq_update_util() [...]