Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp344806rdh; Thu, 23 Nov 2023 05:40:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IH49y09EPFNexUtuU99+6sJapJM7Sjr/nVqk5fy2b2Br0Oc47TC5UKygKfbLtUEZyNobgdm X-Received: by 2002:a05:6a00:1903:b0:6b1:c1c4:ae98 with SMTP id y3-20020a056a00190300b006b1c1c4ae98mr5904922pfi.18.1700746842369; Thu, 23 Nov 2023 05:40:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700746842; cv=none; d=google.com; s=arc-20160816; b=KUe/63s9MQCWXRdboHDDelwBHRjLuYu4iqxMmGKAKeUCahqkMB7eLmFds4g0VF+ppF EFd3qWcsr2K0DvpmFvVUGu3ryrtkX2Bg+O8MQdO09r/051PUpSiJBRw08eeasSDDjn5i g6hV6+PgdAah+BjtMb+WeXk+RWASUIUbHHtlH7Tt/Fbxkv13HblOiJAD434yNkJQ0pFg Mj/6xkslZy80YGf8LFRAMpMccMg9pncxC8a3PcaGNd896vFA0WuFP3vyVDbjz00GTQJb jDATN8ggvfbekhiG+9Df5+gjMkxd1tAXhO2Aj/oAlXIK4ghuMYyTffSq1VHN1tC4oVMy KqbQ== 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=eVDsDxYliWC5xW8ZDSuWoJIog0SBBE+nKOkI20zAozo=; fh=4S/yRhntxTa7SruTJARyWJJLiOqMvm9w5QjRs4ES/Eg=; b=m9uv8Royiakdjd6Q2hMONNem4Gm23vmXv0H+eQABgy/XUYi14GCz/R29ZG9MJcMuYL yKL0u9y7KjT5XNrhJiZRFYhwb/aosYRuOyZ4MEJE+pe6SugwKKrlcyJmQOd1SY6YJ6cg x19yUsGZK/9TLTCQ8aPbLd1qczo8ARcgESQEUTIJ1HdI0BtTO3vMbYVN8o6OGh32IeY1 1fRDJt29Ifpba+b4RBVTBD8cgpM/v0khUwWq1q6nMQVmb1hEXj0ypTg7DaCvcBFFnN89 xCdO4JceLBQMqMMLQRYvUIznpoSLF1ma0RIVQo0rJ9Yb1bwoffdReu44+W6gB+bpMdO3 XLMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=t7YTy+tv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id x28-20020aa79a5c000000b006cb66a1fa04si1231657pfj.33.2023.11.23.05.40.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 05:40:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=t7YTy+tv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 22851808752E; Thu, 23 Nov 2023 05:40:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345569AbjKWNkK (ORCPT + 99 others); Thu, 23 Nov 2023 08:40:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345536AbjKWNkD (ORCPT ); Thu, 23 Nov 2023 08:40:03 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AFA1D40 for ; Thu, 23 Nov 2023 05:40:09 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40b2c8e91afso5929095e9.3 for ; Thu, 23 Nov 2023 05:40:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1700746808; x=1701351608; 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=eVDsDxYliWC5xW8ZDSuWoJIog0SBBE+nKOkI20zAozo=; b=t7YTy+tvGV9s/CeFP0DyVTNRRMQFjk6NpifKhiavcJ4m2A7tV+raYH4TpyCrCYR1IG nfh8UQxbQr4axmAdHl4m1D8Y57vnbPLlPje2ffpJJcNxkax3LOAKPuWnGIlCb6ZpEaD0 2H2/wKotaTuu2hjMWs9vq+hsL1Yq/9q7UImwJ5QGihxdUwWstkLEpZ/ASDa7o2wiIeqX wMh52fsfTC+utyaUI+81OsNbnq1Cj0/Q2dUQ/F/1ky72A76kS7amxKpUHXY9IXYmc7nz jbB8w2ARlbX1Fpcd+IRmr6vVZaRkQZjDdiqrP7CjK0dan94xxWIBSXtG4o6nQzI0rWgS w/yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700746808; x=1701351608; 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=eVDsDxYliWC5xW8ZDSuWoJIog0SBBE+nKOkI20zAozo=; b=GIy2xbeC/PWNyt9hSCXsWMsY6aNvOVE67vk8fKeg55zmQaIYdQzfcmiHSX0kJcn+me 1V123mpPkIOxGaU15aBMOdH14Qw9AOlH/sBC6ly5wecAo/ZbvFta0OTkwUlyyhL9CNf5 U467dMO2OqzHX3sXVl0S9Fm8560xP8RPozfFtMBRbSgn/CGzTZ/qE1H8u2BK9eCDrR0D w7Bjhfwz8bJDhJsaaIWzDhKKwFbtCBIBFvFyvAkiAwinaEoez5LgpODCU1+0rbJH+nJp Q9TePja2gnGgIy8+UvgfkzfFLasf/qWWgbCYnuLRqwk5Ad1FKVJmZ7MNQQGbStgEIP46 oUXw== X-Gm-Message-State: AOJu0YzK7Vex4vaPeQNZf3lSwW3fCe2rYSw04n6C1TefLPUrziu8hU6z 8u6OpyD5KdMypFRP+yJyRlcwIg== X-Received: by 2002:a05:600c:5490:b0:408:3f61:cb4f with SMTP id iv16-20020a05600c549000b004083f61cb4fmr3646255wmb.23.1700746807827; Thu, 23 Nov 2023 05:40:07 -0800 (PST) Received: from airbuntu (host109-151-228-202.range109-151.btcentralplus.com. [109.151.228.202]) by smtp.gmail.com with ESMTPSA id m6-20020a056000180600b00332e73f8231sm25946wrh.39.2023.11.23.05.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 05:40:07 -0800 (PST) Date: Tue, 21 Nov 2023 22:31:34 +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: <20231121223134.iewtzozmz6bz5jr5@airbuntu> References: <20231103131821.1176294-1-vincent.guittot@linaro.org> <20231103131821.1176294-2-vincent.guittot@linaro.org> <20231114205422.k5m6y4m5vnw7dvzj@airbuntu> <20231121211725.gaekv6svnqdiq5l4@airbuntu> <20231121220955.uxk2zanxfemwyfz6@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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 23 Nov 2023 05:40:39 -0800 (PST) On 11/23/23 14:32, Vincent Guittot wrote: > On Thu, 23 Nov 2023 at 14:15, Qais Yousef wrote: > > > > 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) > > yes, this is to ensure enough performance for the deadline task when > the dl bandwidth increases without waiting the rate limit period which > would prevent the system from providing enough bandwidth to the > deadline scheduler. This remains true because it's still at least > above cpu_bw_dl() Okay I think I get it now. I think renaming bw_min to perf_min or something along those lines in the next opportunity would be a good thing. > > > > > 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. > > cpufreq_driver_adjust_perf() is used for systems on which you can't > actually set an operating frequency but only a min and a desired > performance level and let the hw move freely in this range. I see. Thanks for the explanation. Cheers -- Qais Yousef