Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1015624lqd; Thu, 25 Apr 2024 03:42:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhaGLu9rAlNm8QuBtDWDql6JB6SvZYzGxszTSBa/YXcl0kVwSBf9pKoTDJptyHFtKDasDVtpKBZP2I5hWacryTzUvTLuSz0Unjaxukhw== X-Google-Smtp-Source: AGHT+IFMV4OCHqwDuA9KbQAMdYsS/kuN1KHNzu5Ku2jVFKxqJTl/R8HUMP2RnQU+kHE69NS+T9It X-Received: by 2002:a17:906:1ec9:b0:a55:54ec:a2fe with SMTP id m9-20020a1709061ec900b00a5554eca2femr4301808ejj.29.1714041761279; Thu, 25 Apr 2024 03:42:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714041761; cv=pass; d=google.com; s=arc-20160816; b=JBvapy004DfDGE2AmSl76zbY9zLVBTtnkRyVoitQceqJckcEoBKcZhtnfJ+A2CqqOM csebz3l2B8mXbPrQca5ykPY8By1isPbHBpjwdBHpcp/QppSLxOwLKVwkF993cdYvU3fa v/AvCzo6qnc0rduSNRQeSDzHrt4jFiZ8PClyEqkwCP45H1BBoFzr2s12sYcgQSG+9b5J k6Z6NBGUflvnhX9kEsHSU/iuEzG5CEdY8bb8PVEAACAfxfJgI2iBFzQuGt2aupHzlAVF wp1rbaHFwUBXvOfH+StQGhUWis4leyAbHP4rdBjmlFQUUtSPevQBlU31bcfS2gyt1Ych NZLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CLU0CWx+zn8bjJdpCgnHQM0eSQvzJLmaK6f1Wl5JDYk=; fh=Ouq9qUjiHjuvPwH2PH5oLM6jJKZWOQ4HSeMj69kFe8U=; b=xsM1i8c8YtjQfQiUr9zbhCH8jFWdqE5F/LtJL3fcG7IzRovf5ugiBL71OvF0b6Uf7t N93rdhK1USReTm8OVNugytxaOLo5kcSzh/X79jjahHpoqqTGVKxd3QM9DU7tnwQfX6kw MtFX9b6ozA62JRD3guUQYFowLD68KtmOTyCW8XdCKo5Wlg9nSCjKP9/esVsVR2jQFpfw gzGzMQkzdA7Z542+P6X/ZdVrvQxFJ2EF2aoipcACKcZszsK7VB4rGp8SWoJqPVHBQGov S92igd/gCai6BCOdVDYuXOb50FJbOZ//YMlKm3SLtM4DPcTRnLQm28BnOC/B677t00Hi qQAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=v+BOFv5e; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-158408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158408-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dn18-20020a17090794d200b00a5595c0a6a5si8022734ejc.858.2024.04.25.03.42.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 03:42:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=v+BOFv5e; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-158408-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158408-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D37981F222B0 for ; Thu, 25 Apr 2024 10:42:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7959D208A8; Thu, 25 Apr 2024 10:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="v+BOFv5e" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3C9A1865 for ; Thu, 25 Apr 2024 10:42:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714041753; cv=none; b=b6E/nawiWKAW7NyWIsUbvswnrbV5oyinYLSGbS1S5PWzt7sNV0iCrfDFZonBwLT8jWKN1zH/kz/fxNPL6e6/U/hh+Mw+ExMQ7GgkIPfVBhUTtTwUZfZWRVJQwUI4gf1nk/Lk20VlkrI1PFVVnZuVOmpYooHVtcjFrJqCju3OxVU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714041753; c=relaxed/simple; bh=/r9C2Rdjx/dej0MOPcNKR8WH/CjnanoIVxfs1k4AJXI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PsIgUBiprLPZF8BoA+/5izp1QOtk7tWGmA0/9xUPstXN1M0gFInp/e7P8aLCPrpro3P9DEmLX9e/pp2hW+y4htJI4XsHdJzrJzbWZmVaeshiAZn1RUF1AQJoaMRYzRmxOM6Xd/6jvJRTiDaI6v+yOyOekaoaw05+aApKDf5dn3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=v+BOFv5e; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=CLU0CWx+zn8bjJdpCgnHQM0eSQvzJLmaK6f1Wl5JDYk=; b=v+BOFv5eU9cp2MJ/v0c3Z+tAN/ Huc1ZXYjGgqTbWoQHN0dWao2gV0tJ6aCw+5aAWMu9DSqszb2Q56+qzQXZmPG1orRsxzhXZyW11E2n GdWvt7VUrX5Z/8PRDITztZCmUmlJUwcUxNE2O6IG0Lh/zVM77CYy/huhKLdjzw4a2X14ZPqqCxdWy cst7B/Wmn6LwEkpP+TH7pcSm1v2SaQo862LDJgMHE0uGyrxL9y2w27slxP+gi2fIn5c911ihXT1xz OLGj6LPMtwKd8DepXcw3x+5FX5e6WXXsz7LbYdDJ7mZ+u4K0s2IZaqbmu9LMo8yIcRgf1tAl0ilMS v5wTQcEA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzwYW-00000002qds-3HvC; Thu, 25 Apr 2024 10:42:20 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 71DAE300439; Thu, 25 Apr 2024 12:42:20 +0200 (CEST) Date: Thu, 25 Apr 2024 12:42:20 +0200 From: Peter Zijlstra To: Luis Machado Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org, kprateek.nayak@amd.com, wuyun.abel@bytedance.com, tglx@linutronix.de, efault@gmx.de, nd , John Stultz Subject: Re: [RFC][PATCH 08/10] sched/fair: Implement delayed dequeue Message-ID: <20240425104220.GE21980@noisy.programming.kicks-ass.net> References: <20240405102754.435410987@infradead.org> <20240405110010.631664251@infradead.org> <3888d7c8-660e-479c-8c10-8295204e5f36@arm.com> <1461277e-af68-41e7-947c-9178b55810b1@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461277e-af68-41e7-947c-9178b55810b1@arm.com> On Wed, Apr 24, 2024 at 04:15:42PM +0100, Luis Machado wrote: > > Bisecting through the patches in this series, I ended up with patch 08/10 > > as the one that improved things overall for these benchmarks. > > > > I'd like to investigate this further to understand the reason behind some of > > these dramatic improvements. > > > > Investigating these improvements a bit more, I noticed they came with a significantly > higher power usage on the Pixel6 (where EAS is enabled). I bisected it down to the delayed > dequeue patch. Disabling DELAY_DEQUEUE and DELAY_ZERO at runtime doesn't help in bringing > the power usage down. Hmm, that is unexpected. The intent was for NO_DELAY_DEQUEUE to fully disable things. I'll go have a prod at it. > Though I don't fully understand the reason behind this change in behavior yet, I did spot > the benchmark processes running almost entirely on the big core cluster, with little > to no use of the little core and mid core clusters. > > That would explain higher power usage and also the significant jump in performance. ISTR you (arm) has these tools to trace and plot the varioud util values. This should be readily reflected there if that is the case, no? > I wonder if the delayed dequeue logic is having an unwanted effect on the calculation of > utilization/load of the runqueue and, as a consequence, we're scheduling things to run on > higher OPP's in the big cores, leading to poor decisions for energy efficiency. Notably util_est_update() gets delayed. Given we don't actually do an enqueue when a delayed task gets woken, it didn't seem to make sense to update that sooner. I'll go over all that again.