Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp327304rdh; Thu, 23 Nov 2023 05:15:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFApqhJaIk7I6Q2+NVGdKzluBBB04JA3GzQiocigLGs3ozjQjHJ08K0fLs30oTdPUzH61cK X-Received: by 2002:a17:90b:1c0c:b0:27d:6937:db89 with SMTP id oc12-20020a17090b1c0c00b0027d6937db89mr6054048pjb.43.1700745327427; Thu, 23 Nov 2023 05:15:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700745327; cv=none; d=google.com; s=arc-20160816; b=S79VwwMoX4hMqkwk+g8FcYGZAo7a0FhZuzcXHpcy/rQxlLAQyvK0LAY5ZmewFHLqCp 3xri5RYedICmnjm3HFi+Jaf2UQ5LDrQ/p31A/gzs7Jq5S/laNXZDqPheqlDmrBCfRlGO HQDea5+1E1NKyt/h9CqN4uVSTJxwTbNjZHq0rU2fpt/CkI1lMEZcNcBQozCj0qeO6cdH zE595uMCCtEU0YeoZ08JNV/Qs0RCvgyeRLDa0c2V3YLE8vEzBSdmbFj33QqmowfB2XKW 6TOy1AgCZMYq7Mi0bqPVK+2qmQLdLkxipIEl9IccVzRXRyMQYSAdOkhPv31yr4kU/Wl6 Kl+g== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Jo0VusAlTEB88f2sT0ODs9DnrUfyK3YpWUuHjmpc9uU=; fh=4S/yRhntxTa7SruTJARyWJJLiOqMvm9w5QjRs4ES/Eg=; b=vV5NML6wHjAAsHIN6K75/sbpQD7UiM3fsE+usvh6eP7U7c0o5OyC6NJuAW/ysSAxgl TMlTfzcjiktCwdahq5mColcA46TqkW/TPcl6m0r0yzAfAX1Qp0qUGtIOCh0vr90wGdtJ T1tZF7xa+lNm7uXgBi2cOqJtDbtQdymfbF9ac8UapZ8mEbR8yKTz6gbSeykwpg/9k2kP /h+O59KnZWH+lQRMoC9LeiiWYyzID4DVicavGWuXtQ+dtgg1cpai/GuVIHFD4dsQSUQ6 0KF8IxVJdMyzdUPSZSwBBE2MjkUI/U8r2iwAA0n62PrE81f6REKNOtXAD/4Wqso5M8B1 vwsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=Lqi+60Kv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id k1-20020a17090a9d8100b0028025d519cfsi1801947pjp.177.2023.11.23.05.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 05:15:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=Lqi+60Kv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id B65568087263; Thu, 23 Nov 2023 05:15:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345431AbjKWNPD (ORCPT + 99 others); Thu, 23 Nov 2023 08:15:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345410AbjKWNPB (ORCPT ); Thu, 23 Nov 2023 08:15:01 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBBB0D40 for ; Thu, 23 Nov 2023 05:15:06 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40b2afd049aso5795935e9.0 for ; Thu, 23 Nov 2023 05:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1700745305; x=1701350105; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Jo0VusAlTEB88f2sT0ODs9DnrUfyK3YpWUuHjmpc9uU=; b=Lqi+60KvDiXwNLjA78wrxV55qinBfpY+X4OQ/G8GlS0RJt5pjv67fvFWWNXd+S48ml ss7fwMJF+3Ag9zOjWUTqVg9F/MxFa+hXKVq23IxJaMo2dMAdFcr6pV3ZdFSLmUOFkeQl fFIx8IytyGYdYbu25GNyeHHFp7lb5/dv0z3CE8+Upm3A+ChUFQ+austUv2grBnLmm8U2 shOymWzYakbHQfCjx5P+2h8ks2qZ1Lynt0UdeLYoB9bzjs+6cqhjDmdWXVHENy0grLkC RBkuz+hBOaYVdCCeOUix3r7cRmRr8tWJciXRYCKgX1pErRvGZK3LRFxQRP2MZZXRwGHC lcYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700745305; x=1701350105; h=in-reply-to: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=Jo0VusAlTEB88f2sT0ODs9DnrUfyK3YpWUuHjmpc9uU=; b=hgU++AxgjmBZDGtT4iXEWwShESl/ojzYMWJkC3MDjnEG6bnsx/Pi1ZvVRzQS4T47zx wozOmMDtF1o0dS7KPbD5nh/J+9cSd3bNS+OERkmdPyT6a005cbsaRbB4zy9t0GopmsPK hMQdqXRDrsJQadH70yLxwAPCRMBsSNdIJqGRMXr4BlYHH7ERZBzKcD+Ar2VRnylR+3Pi z+eNjWgK7lded29AvWA66Id0ELhmRrABPEXatBX1yqjnOMXhHIzVlcGIsARGChrQKK9v esDEBeQH/toLFj8qNQ9Lw4Gixe9kK82YflCHfSIjziaQeYFcaFUuZHnJ9kED9SGXdZ5+ zkoA== X-Gm-Message-State: AOJu0YyPtP838+7+bBYLn8iSYHwZMCTaUV++TWv2PnR02UqqIaAgMm/W Wk7e+vT+9xGPmZBxd6PCNFMDxg== X-Received: by 2002:a05:600c:1990:b0:401:b504:b6a0 with SMTP id t16-20020a05600c199000b00401b504b6a0mr4303066wmq.3.1700745305079; Thu, 23 Nov 2023 05:15:05 -0800 (PST) Received: from airbuntu (host109-151-228-202.range109-151.btcentralplus.com. [109.151.228.202]) by smtp.gmail.com with ESMTPSA id o36-20020a05600c512400b0040596352951sm2722938wms.5.2023.11.23.05.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 05:15:04 -0800 (PST) Date: Tue, 21 Nov 2023 22:09:55 +0000 From: Qais Yousef To: Vincent Guittot Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, rafael@kernel.org, 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 1/2] sched/schedutil: Rework performance estimation Message-ID: <20231121220955.uxk2zanxfemwyfz6@airbuntu> References: <20231103131821.1176294-1-vincent.guittot@linaro.org> <20231103131821.1176294-2-vincent.guittot@linaro.org> <20231114205422.k5m6y4m5vnw7dvzj@airbuntu> <20231121211725.gaekv6svnqdiq5l4@airbuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.3 required=5.0 tests=DATE_IN_PAST_24_48, DKIM_SIGNED,DKIM_VALID,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 howler.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 (howler.vger.email [0.0.0.0]); Thu, 23 Nov 2023 05:15:19 -0800 (PST) On 11/23/23 08:47, Vincent Guittot wrote: > > > > And is it right to mix irq and uclamp_min with bw_min which is for DL? We might > > > > > > cpu_bw_dl() is not the actual utilization by DL task but the computed > > > bandwidth which can be seen as min performance level > > > > Yep. That's why I am not in favour of a dvfs headroom for DL. > > > > But what I meant here is that in effective_cpu_util(), where we populate min > > and max we have > > > > if (min) { > > /* > > * The minimum utilization returns the highest level between: > > * - the computed DL bandwidth needed with the irq pressure which > > * steals time to the deadline task. > > * - The minimum performance requirement for CFS and/or RT. > > */ > > *min = max(irq + cpu_bw_dl(rq), uclamp_rq_get(rq, UCLAMP_MIN)); > > > > So if there was an RT/CFS task requesting a UCLAMP_MIN of 1024 for example, > > bw_min will end up being too high, no? > > But at the end, we want at least uclamp_min for cfs or rt just like we > want at least DL bandwidth for DL tasks The issue I see is that we do static void sugov_get_util() { .. util = effective_cpu_util(.., &min, ..); // min = max(irq + cpu_bw_dl(), rq_uclamp_min) .. sg_cpu->bw_min = min; // bw_min can pick the rq_uclamp_min. Shouldn't it be irq + cpu_bw_dl() only? .. } If yes, why the comparison in ignore_dl_rate_limit() is still correct then? if (cpu_bw_dl(cpu_rq(sg_cpu->cpu)) > sg_cpu->bw_min) And does cpufreq_driver_adjust_perf() still need the sg_cpu->bw_min arg actually? sg_cpu->util already calculated based on sugov_effective_cpu_perf() which takes all constraints (including bw_min) into account. Thanks! -- Qais Yousef