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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66CA5EE4996 for ; Mon, 21 Aug 2023 16:40:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234486AbjHUQkU (ORCPT ); Mon, 21 Aug 2023 12:40:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbjHUQkU (ORCPT ); Mon, 21 Aug 2023 12:40:20 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 71C01CC; Mon, 21 Aug 2023 09:40:18 -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 2723C2F4; Mon, 21 Aug 2023 09:40:59 -0700 (PDT) Received: from [192.168.178.99] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E839B3F64C; Mon, 21 Aug 2023 09:40:16 -0700 (PDT) Message-ID: Date: Mon, 21 Aug 2023 18:40:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 3/4] sched: cpufreq: Move apply_dvfs_headroom() to sched.h Content-Language: en-US To: Qais Yousef , "Rafael J. Wysocki" , Viresh Kumar , Ingo Molnar , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Vincent Guittot , Lukasz Luba References: <20230820210640.585311-1-qyousef@layalina.io> <20230820210640.585311-4-qyousef@layalina.io> From: Dietmar Eggemann In-Reply-To: <20230820210640.585311-4-qyousef@layalina.io> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 20/08/2023 23:06, Qais Yousef wrote: > This function relies on updating util signal appropriately to give > a headroom to grow. This is more of a scheduler functionality than > cpufreq. Move it to sched.h where all the other util handling code > belongs. To me map_util_freq() is the power counterpart to fits_capacity() [fair.c] which is used in schedutil (cpufreq) and EM to do the same* thing as EAS in the task scheduler (fair.c). * With the already (PATCH 1/4) mentioned difference that EAS deals with `util_cfs` vs `capacity` whereas power deals with `util` vs `capacity_orig`. [...]