Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp532426rdf; Tue, 21 Nov 2023 09:03:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlB6xq8z5ZE9jIoFKUGnrKUrO4d19llg5fEUXFEcDlifQsFf6TVx1twp8rZj2Ovj6GybpA X-Received: by 2002:a05:6a21:a587:b0:187:c7d1:9f66 with SMTP id gd7-20020a056a21a58700b00187c7d19f66mr14040882pzc.52.1700586186824; Tue, 21 Nov 2023 09:03:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700586186; cv=none; d=google.com; s=arc-20160816; b=ptyWhMiyX/juEt8K+jR8PWKJd7rdNSE1xs6yPPFg7wHeq+WBhMb0mk5QQG6Ay5oA0A xXyMPsYlnBxV8g3cnHFJJ8uK2oBXfx3bFvus1dj3wvEt190mWJtISTcC9+O/PIGt0DU2 NzCeNNJ2dhk0TUXhS1V7o8r4df69/XMf76k4HaudjYQNTiI3ELwtr3nz8mNg+UxdbUUD M5G48oKKxOFO/elT175riXzpkFlbTDwI3w3JVS010ZWeXvGvQ3VMrEPuXNvCZI9kNvWd 9YwAbfUIPpydLtABJd+zZaX8OyxkvXX1O2QWbLMMV1IBoN8Rsk4f4xy9vam4zD3UMFsh oAHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RY5bcl1x0MOfQG1a+xI6jyP9NlPUMrTJp9SfZPaMtRU=; fh=/BLaAhDrYRv2QKIy6nCRBLYXC3DICXV4u/9YGI24Qmk=; b=tJJ+3zWjiGnefY/HAxotDk3m9afgDc1ixNi1tUVZaHQccB323lVmQpxexHJrL8j7Ca uiUs+pSgn9256cozEtQlA1OB1InkJy3uIBW5z+b3M3Ul3T8DwD9lMSvzT19n6c9ioloX t1N4X0/YVbYpZptQ6RxEfR0Y4/nObr48ac3FE6CQtu7WTbLkbG81Ly0K1IQ37j6JYmMx hqdQu8gDeMw2xQixWHGK018aAHMD1a4JJWGHIBYt+Hagde7oKB2njPPvTQUqXZxRMRnI PKJ6lhNKIE0lXSChAA7ezJzOvyl2jrLhE+omVQ7Hu/sjVh84zXf1NNexaFpg48KukJAN PSDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=vBFX28TR; 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 Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u24-20020a63df18000000b005aee0914b6csi11229158pgg.8.2023.11.21.09.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:03:06 -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; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=vBFX28TR; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 461F4807DEEE; Tue, 21 Nov 2023 09:03:01 -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 S231287AbjKURCs (ORCPT + 99 others); Tue, 21 Nov 2023 12:02:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbjKURCr (ORCPT ); Tue, 21 Nov 2023 12:02:47 -0500 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB87B10E for ; Tue, 21 Nov 2023 09:02:43 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c871d566cfso46090871fa.3 for ; Tue, 21 Nov 2023 09:02:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1700586162; x=1701190962; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=RY5bcl1x0MOfQG1a+xI6jyP9NlPUMrTJp9SfZPaMtRU=; b=vBFX28TR2bJC6tSdQXVe3UL/sE/o35fhE/8cq3/EVycTKBMmR2yN+slXCatW8C3WEJ FFNGr7fiV+y5eKVUOcP2HDENJyjQ2H5eFIi4zM8IQ9J0RIZ+4zrE4MO+r9Rtj23JEKT/ K2QoTG7rOmrmKD+Q1he8kgRjZmPzMPjbPZSrPz/q2mwYJrQ+csUvOxLt47gFZVfXs1Lc dvKiOniDnHy1CfPiLs4YEO1zYuCm95sxXzXFnesAsD/4BkAEfQt2JHNSGCJmT+p+PEOZ /L5UQH9XOP1WWK22R4jWkZiausMJwcBT232LEwG6hSH4AjEmdN96qUtLrxH07wruebnQ VSpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700586162; x=1701190962; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RY5bcl1x0MOfQG1a+xI6jyP9NlPUMrTJp9SfZPaMtRU=; b=tBRBYsabLPWVFuWxAytrDJLBc8cRuR+8Gv7d+MZV/cIxyegFb539Rz9mpb1ACukniE 9GFKvQ5wch7qv54YgsBeBlXotqdiLdsAyAPB5+Aw3gX4RDAq2prOx5IZqyyf6Oa75WHc uq06RTFHftRQ6szt05lwWru8TxBP3opOwPbFasH0oUZT73KxCzaQ+cCkMK9ldFh5F00L xYzlKSrY6BiJE5nnCUBuLDGysUDlmFpdgQkxmTKdNKzOgJC5KC4SveNpBBmNFAjNCNXq bhH502JFM8PZYbfQXnl0Ae3Rt3vzhyJCEyGEXRjEmwNLRGyfXOG129Lha60igZwE6kY2 NHaQ== X-Gm-Message-State: AOJu0Yw+0Yeq0HbSj6ISQFQLbLPa4cyPLc650Zy568X/qAJvbQewAZl8 8OM3xxWuvMYT85R0lLGdcuSDQg== X-Received: by 2002:a2e:878d:0:b0:2c5:4a0:f3cb with SMTP id n13-20020a2e878d000000b002c504a0f3cbmr7237202lji.11.1700586158495; Tue, 21 Nov 2023 09:02:38 -0800 (PST) Received: from airbuntu (host109-151-228-202.range109-151.btcentralplus.com. [109.151.228.202]) by smtp.gmail.com with ESMTPSA id k7-20020a7bc407000000b003fd2d3462fcsm703126wmi.1.2023.11.21.09.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:02:38 -0800 (PST) Date: Tue, 14 Nov 2023 21:13:32 +0000 From: Qais Yousef To: Peter Zijlstra , Vincent Guittot Cc: "Rafael J. Wysocki" , Vincent Guittot , mingo@redhat.com, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, lukasz.luba@arm.com, wyes.karny@amd.com, beata.michalska@arm.com Subject: Re: [PATCH v3 0/2] Rework interface between scheduler and schedutil governor Message-ID: <20231114211332.c3yhmfm7vxgysi72@airbuntu> References: <20231103131821.1176294-1-vincent.guittot@linaro.org> <20231116143450.GF8262@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231116143450.GF8262@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=1.3 required=5.0 tests=DATE_IN_PAST_96_XX,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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, 21 Nov 2023 09:03:01 -0800 (PST) On 11/16/23 15:34, Peter Zijlstra wrote: > On Mon, Nov 06, 2023 at 04:05:40PM +0100, Rafael J. Wysocki wrote: > > On Fri, Nov 3, 2023 at 2:18 PM Vincent Guittot > > wrote: > > > > > > Following the discussion with Qais [1] about how to handle uclamp > > > requirements and after syncing with him, we agreed that I should move > > > forward on the patchset to rework the interface between scheduler and > > > schedutil governor to provide more information to the latter. Scheduler > > > (and EAS in particular) doesn't need anymore to guess estimate which > > > headroom the governor wants to apply and will directly ask for the target > > > freq. Then the governor directly gets the actual utilization and new > > > minimum and maximum boundaries to select this target frequency and > > > doesn't have to deal anymore with scheduler internals like uclamp when > > > including iowait boost. Thanks a lot for taking over Vincent and helping with this! And sorry for delayed review, was out travelling between holiday and LPC so haven't caught up with the list properly yet.. Beside the comments on patch 1, it looks good to me. Do we want to generalize the way the interface is called though so that scheduler is not tightly coupled to schedutil? Speaking with Intel folks in LPC, it seemed they rely on firmware to make a lot of decision and if we further generalize how the interface is called (I think we need a new cpufreq wrapper akin to cpufreq_update_util()) to allow governors to hook into it and do their own thing. This could allow them to use uclamp and these min/max perf hints. But I haven't thought this fully through. So something to consider separately anyway to not hold this up unnecessarily. Maybe we do want to keep schedutil tightly integrated and get people to switch to schedutil instead.. > > > > > > [1] https://lore.kernel.org/lkml/CAKfTPtA5JqNCauG-rP3wGfq+p8EEVx9Tvwj6ksM3SYCwRmfCTg@mail.gmail.com/ > > > > > > Changes since v2: > > > - remove useless target variable > > > > > > Changes since v1: > > > - fix a bug (always set max even when returning early) > > > - fix typos > > > > > > Vincent Guittot (2): > > > sched/schedutil: Rework performance estimation > > > sched/schedutil: Rework iowait boost > > > > > > include/linux/energy_model.h | 1 - > > > kernel/sched/core.c | 82 ++++++++++++------------------- > > > kernel/sched/cpufreq_schedutil.c | 69 ++++++++++++++++---------- > > > kernel/sched/fair.c | 22 +++++++-- > > > kernel/sched/sched.h | 84 +++----------------------------- > > > 5 files changed, 100 insertions(+), 158 deletions(-) > > > > > > -- > > > > For the schedutil changes in the series: > > > > Acked-by: Rafael J. Wysocki > > > > and I'm assuming this series to be targeted at sched. > > Sure, I'll go queue it. Thanks! Sorry for being late. If this wasn't queued already I think worth waiting to iron out some comments on patch 1 first. Thanks! -- Qais Yousef