Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp725000rdh; Wed, 14 Feb 2024 09:26:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUDfKbnBqZpppqOHF0VZUYHnbLHg5lgl0lD/jW8Msuyho2t+TPFWaHniWDYUPrz1fWXY+D1UZdqspNVI7YzmKgV2Locdo7sW7LfTVlDEQ== X-Google-Smtp-Source: AGHT+IFXgWydFULHqRoVhWsabJkKIcfyXNlU8vJ12OmbcmnI9wtDMd7PwTXlBnp9Fmd8UP8jjUNT X-Received: by 2002:ad4:5def:0:b0:68c:aaac:46d4 with SMTP id jn15-20020ad45def000000b0068caaac46d4mr4078149qvb.33.1707931591650; Wed, 14 Feb 2024 09:26:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707931591; cv=pass; d=google.com; s=arc-20160816; b=qjby3igivVSBik8WLonBDj7kXl3eRUl2zqSpXVuB4WEc5Je89TNsNI7c9oK9KPSWGm MLPKVUNvtBqSukGeYni1Gq/0AGLU8HUA8vjdYAQLrbi0psG8Zo3KPSgTzfEflYu+bA+5 ucOxX+MlwMwe33beqcuZYZbcp7W8ptm4OhFqTQVnf5uSnAOUcbo5juo7WikkhAnYo4QW 0E7E5+7LVbNBbttypNP6c4MUT6lbBk/ZvBbSW2Mu8i40iP+mAwtG6Ayo+AN7eGsv4s0Q 4X6Egp2kPtbGhDQAfaY9qlncMQ57K+KtOneN53pHWw52mj6J5gJyj5kUGWb9wO7E/+yX h32Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=kw0uq0XOL+rqmT2qCSrqkVhQlASOn9CgRE95m/7HlUY=; fh=GqohVtoWqHWm0SPVJlti3grDQcoeVV1ctReQWzVrHo0=; b=ApUDktKnc88EQrf5ECmucWwPZGfyixfrU88ou8CPV/aMnHsl8bpo+0j7A/WvVI8/Zf d0yOXWwmIlTrTFpPGY9R9ksxSlittkHBzpcV9HqK5yn0DL/gorOXZb1qblMSJd9K7Ma7 8bZDDXPlWb6rtaMfsPFjNjwuOl8mjAn+uDduQWmvo38Viav0Zt5Ul7v5zaxYwgEE/dsL 6PcYz92ZkQr68Yr/9VSYuN0QB0RP2+Y3Ick/fBNHU0xjiDdg34ASypiuOx7o1/6r61tM 49y+NnSEbkQlnRjFv8uul0OtAx8Xkfr1mEcKRvnyOvwAKjoy7lGTcTQ1zc9Js6HpU1cE 1zbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t+rcH8Gi; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-65660-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCVOj4ARQFUIQPrAZH5pZsSAtPLLUuisG2BG3pa+MLcLHSMV3/58VU3ldr6BAQbGPXbXv62JL17rZQFB2BSYgVlFAX2iw+1O+gmdbbkz6Q== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id iu1-20020ad45cc1000000b0068efc537339si2667050qvb.217.2024.02.14.09.26.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 09:26:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65660-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t+rcH8Gi; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-65660-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2B6261C2651E for ; Wed, 14 Feb 2024 17:26:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE049126F04; Wed, 14 Feb 2024 17:22:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="t+rcH8Gi" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67B1E8662D for ; Wed, 14 Feb 2024 17:22:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707931349; cv=none; b=PO/dFswn38Jq4GK/1dmynqE0GWgyBjBGHlOHDzD65/ctpQRmx+VnGUgjS2g4aDN8pA6RrumvrAM/5eT/nLiugIM0RF6Lg+5ibCuDMFqax+bK9bb1e5auJEHiA/Y25poKSKaQ/mAKC3/DBTC0AcbCg7gy9nA2CvXB/l9TDq2Cnqc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707931349; c=relaxed/simple; bh=W11xoHjWYpOlIFvCUlTEoYUvCFSB4r1v8f/OHKLMzUk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=EvjePkxfap+sMPydgVkmyeMgCRIKqId4gdwMpLSWxV5glDypH4og51MY9xfbGub7SxZoFOAlYw5YO1Vx0pgngc8hI58q4Z4YfLrnmrUIvfoGuO5jF6ZeJjtnOtyt1PPPMOo5j9GNlPNPjXAlJeF8IQgu6RWqS1ZLL0Y9UAlBJqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=t+rcH8Gi; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1db51e55023so8611645ad.1 for ; Wed, 14 Feb 2024 09:22:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707931348; x=1708536148; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kw0uq0XOL+rqmT2qCSrqkVhQlASOn9CgRE95m/7HlUY=; b=t+rcH8GitgEbZ6DkuAEoLcCnutheaKUbKOJRkCy+r9ZMsGlxEQQ9/kN7P5QoJNb0FC SEJpdlNejLyanQxqK7f4sD6+9JneGDswo4Ddl5ByAgmQK0E6ou6HLAmLMKUSOARzMCcF iIc99HAJI+Y8VqOhpRLNcs0+cKf07JdeL2VN9CA+R0uNCCw+K13OKaITWHHpP2hd++vK FJtZbD2cMDipIS+FKdHZP8JH7iTrgWEtsMq6BcjtufzOKK37EyELwEJLWWBNm/8zg5sS p0fvdSDXUG0WZf4DsDaQcskj0bXQsK34NUcF7RCVUr9Ter6Fpq8psYErYY3U9mPvyIre 6hlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707931348; x=1708536148; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kw0uq0XOL+rqmT2qCSrqkVhQlASOn9CgRE95m/7HlUY=; b=V07quEpoKB9ZDGMv6e7YcqUFQ994Bs+KMHzj60DLapPDwUyqzxEiPvmytYR6CysTMx 3qCVc2cl0r/Ev3bscUSm7daRnHRds5b1IQq+ENpA1fSRgRpF9iEHXvq97QBWJlYjB7xQ 1nkPLNJsPgFY7IC7AgWIDA2y3rDSdSlfyYDVQoUoi3JHlo+vV7BgI886A2CPMAsFOXtp 7vroGrOcqpeD46CzRhyhb/2PzAmDOtHWLmaUGvvdRIeaNOlySupgrwUgNA5C17j34cNK SFLBYpKvEYLEYtB1KYzNiWwH3ELuGfnV83SadzbgyQzlcyWI9RAIB0jg1knrcY+8uANW P1Yg== X-Forwarded-Encrypted: i=1; AJvYcCUyW0zDnKC+15f8ToLlJ8HJAukb5uKGTa91r23HGO/kRvl3yOuit6JZpfGtG0SRK0HlabMk1mdoj3STDgkA5Vcj/Ceuo6y9d4JWv+n8 X-Gm-Message-State: AOJu0YyxTmuSrdQJzTB/qN9Mt/tr7fudNKbY9g/dMZrBsVgm3aMMg/rl i4LvGCu1iHgLC+ZvGt4Sfp9Tm1MPTj77fg4rdo1wTv6ar/H01Aol5RRyAqzhrOJjRmBpYifrCNR bpdMnteZbgUzP6vb401y1X9gVQKfqE9O58EIG4Q== X-Received: by 2002:a17:90a:701:b0:298:b2d7:77b5 with SMTP id l1-20020a17090a070100b00298b2d777b5mr3280805pjl.19.1707931347673; Wed, 14 Feb 2024 09:22:27 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240114183600.135316-1-vincent.guittot@linaro.org> <6ec54a8f-a602-4f33-96ce-0204f07046e1@nvidia.com> In-Reply-To: From: Vincent Guittot Date: Wed, 14 Feb 2024 18:22:16 +0100 Message-ID: Subject: Re: [PATCH] sched/fair: Fix frequency selection for non invariant case To: Linus Torvalds Cc: Jon Hunter , 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, wkarny@gmail.com, qyousef@layalina.io, tglx@linutronix.de, rafael@kernel.org, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "linux-tegra@vger.kernel.org" , Thierry Reding , Sasha Levin , Laxman Dewangan , Shardar Mohammed Content-Type: text/plain; charset="UTF-8" On Wed, 14 Feb 2024 at 18:20, Linus Torvalds wrote: > > On Wed, 14 Feb 2024 at 09:12, Jon Hunter wrote: > > > > We have also observed a performance degradation on our Tegra platforms > > with v6.8-rc1. Unfortunately, the above change does not fix the problem > > for us and we are still seeing a performance issue with v6.8-rc4. For > > example, running Dhrystone on Tegra234 I am seeing the following ... > > > > Linux v6.7: > > [ 2216.301949] CPU0: Dhrystones per Second: 31976326 (18199 DMIPS) > > [ 2220.993877] CPU1: Dhrystones per Second: 49568123 (28211 DMIPS) > > [ 2225.685280] CPU2: Dhrystones per Second: 49568123 (28211 DMIPS) > > [ 2230.364423] CPU3: Dhrystones per Second: 49632220 (28248 DMIPS) > > > > Linux v6.8-rc4: > > [ 44.661686] CPU0: Dhrystones per Second: 16068483 (9145 DMIPS) > > [ 51.895107] CPU1: Dhrystones per Second: 16077457 (9150 DMIPS) > > [ 59.105410] CPU2: Dhrystones per Second: 16095436 (9160 DMIPS) > > [ 66.333297] CPU3: Dhrystones per Second: 16064000 (9142 DMIPS) > > > > If I revert this change and the following ... > > > > b3edde44e5d4 ("cpufreq/schedutil: Use a fixed reference frequency") > > f12560779f9d ("sched/cpufreq: Rework iowait boost") > > 9c0b4bb7f630 ("sched/cpufreq: Rework schedutil governor > > > > ... then the perf is similar to where it was ... > > Ok, guys, this whole scheduler / cpufreq rewrite seems to have been > completely buggered. > > Please tell me why we shouldn't just revert things as per above? > > Sure, the problem _I_ experienced is fixed, but apparently there are > others just lurking, and they are even bigger degradations than the > one I saw. > > We're now at rc4, we're not releasing a 6.8 with the above kinds of > numbers. So either there's another obvious one-liner fix, or we need > to revert this whole thing. This should fix it: https://lore.kernel.org/lkml/20240117190545.596057-1-vincent.guittot@linaro.org/ > > Yes, dhrystones is a truly crappy benchmark, but partly _because_ it's > such a horribly bad benchmark it's also a very simple case. It's pure > CPU load with absolutely nothing interesting going on. Regressing on > that by a factor of three is a sign of complete failure. > > Linus