From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (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 5A3C1314B83 for ; Wed, 19 Nov 2025 22:52:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763592745; cv=none; b=jVaXYdTbFuRnZVinzWMMct9I5IqbRppQEdU9Fe1knra1KxnYRCvO6TQ+jTz8592hsp6iPa2KqxDjdUPmUizAQlLhCfWD0OT5BZlXeUKxrbA8YSuBaYFYU/rxNPLFo7GOONAPHL0zu3zwNY3dUg9UkQQuk00N1QPwHlMOWZQecWQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763592745; c=relaxed/simple; bh=ZXvmGem1gwvmXBdBtjwkfC/CUQrpbProwp1nnMC3AA0=; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=iV8Zxbntm7x6O4nLbQPCntk7HP7UvZRi4Pli9UEFlgtZkRQbSJDSXetRo3PPXi5asZ8kikK1YVrZQP8PdoO6kxvY8G3o6pAgm7dvUGiTnJG75M2wbO75C3IekPwzAzubCjgI8Ax9mOJFAusAEpIJafpjidGjl6n1GlJbfSWp1Dw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=telus.net; spf=pass smtp.mailfrom=telus.net; dkim=pass (2048-bit key) header.d=telus.net header.i=@telus.net header.b=AAG9rXn0; arc=none smtp.client-ip=209.85.210.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=telus.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=telus.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=telus.net header.i=@telus.net header.b="AAG9rXn0" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-7ba49f92362so156316b3a.1 for ; Wed, 19 Nov 2025 14:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=google; t=1763592742; x=1764197542; darn=vger.kernel.org; h=thread-index:content-language:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=DNOjLlODDT7mgeVset8paaRwwJLENifjVg/m2cEQq14=; b=AAG9rXn0nPkX5E0ImJI29UE15roxzmpG0+Xm5dZy95SsTxRpn8RhIYIy3RZmNykI30 YxAfdbV5JJpR4w8lGf9g0Is0XkoNkVr2bw7dMoJQ3hse/is5HBz+G2QkQjMDTr/srG5Z L4mnTerfZyn2DwmYq9h4uW2Ptb1WG8S9vZOP8dJ4pdmQ1Io/L4bRjHJGVqdJIPTM3LYf g8HYb2Ysu6Q1Lig80DtafZ+ktgqVHqoign3/6Lt3yXAe0dc2P611+KvFA3xJRTLjrQ7m YOqZh0XcrdwrEG/5ymAjgPGhW/IUm74ohJ//r5CENkMleVa44J4naQwvNL0ZdBBGXaT7 cX/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763592742; x=1764197542; h=thread-index:content-language:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DNOjLlODDT7mgeVset8paaRwwJLENifjVg/m2cEQq14=; b=rwnoaHmbqIZ6GrA/9fspItl0h51/1wzspUhYAqXK8kjFDiHcezOKZD97QavlyQaZVX 8h2aLhL0zEcFEYAIgbAUVo8tephmWlKiCH5WDtCbTVoAHwGL0SEjgM7qXEv8afzj2JrV yH20GwWT7VDgI6aTuvj4umAZCi/UlpvB6qrQ2Ca455KxKAG40b07DIP0k/BwD32qh264 hkTZsjTUSKChb2LTYmqu6AMNSrxyHpZ4jWn+hCvEgrgVAbOe9Wk8HTvPYOIkUSDUNYTi QWUumg+n2DHKDJTQQ2y73ZOakCIVYQuI5svnAid7FsBhWeacGGOtkGZDa3Wd91O6rv1r wr4A== X-Gm-Message-State: AOJu0YxVAU7g62mi1EcsnGjrczmTj+gP4j+3Y384+LKl2vmUXC53+IRd gTM19wRmGgowHb0rbawRNPf1BCna9ZtP61o0QU61FIEYNkSrCh6qPER1lILK9+L6s7U= X-Gm-Gg: ASbGnctYJgg7AOE1C7VTPl+kTvnbNfjxppWi/CDtRRRCbhqwycP+01dlAVflxNuruxl GAoxwQF/kiqGDYYUrIEJ/aiKR4AVzLlBUILHmQM4ckswfftxpwqb7XjUUxUsEC9xL1nS6iprHVW 2udFWwZdXpweoOYu99l9z7gEgJogGHiGyeOyfFDuKJtU4jGhG2e/m/SVeDK829uuGr7NWFXe9Ll bC3Xg2kGXBPkz18Fld2KfJFdlFWktZSLnLP0aGdzkj3FAWi6bzV++vHCXNQvrRT56efGgNYEqpv TQr4/b5agA7bzUxElSi9IMtb/w6CyYIZi0aYUp7Fn5M0CBiBrTVU6w25ryMZnjiLARQLQanAh9m 0V+0MI/7O7T9G/HoNjFYIQ6ziIXvAFCvzG/nj4tNQheR4DZ2H0i8rzlI3Hbf93kUDg40uRH4B6U 9ZCXIYHvorUzHjTv8XxLVLDhKtGMUM/HfmffFrbDiIBX2HKN5ejK2YQ9dkydlz1hLLGA== X-Google-Smtp-Source: AGHT+IEUOVs/PEv+o6VMIvuJWjXWVzpvIID7k6tyED5+QqAJqGBvf++DZDjd+NnQ4+2HkzklC2Q9FA== X-Received: by 2002:a05:6a00:22cb:b0:7a9:7887:f0fa with SMTP id d2e1a72fcca58-7c41d72aa7dmr310149b3a.1.1763592742480; Wed, 19 Nov 2025 14:52:22 -0800 (PST) Received: from DougS18 (s66-183-142-209.bc.hsia.telus.net. [66.183.142.209]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7c3ed0751dfsm447524b3a.6.2025.11.19.14.52.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Nov 2025 14:52:22 -0800 (PST) From: "Doug Smythies" To: "'Christian Loehle'" , "'Rafael J. Wysocki'" , "'Linux PM'" Cc: "'LKML'" , "'Reka Norman'" , "Doug Smythies" , "'Marcelo Tosatti'" References: <4701737.LvFx2qVVIh@rafael.j.wysocki> <69115878-ec5e-4f7c-bb3e-9f61cce75c70@arm.com> In-Reply-To: <69115878-ec5e-4f7c-bb3e-9f61cce75c70@arm.com> Subject: RE: [PATCH v1 0/4] cpuidle: governors: teo: Assorted improvements Date: Wed, 19 Nov 2025 14:52:23 -0800 Message-ID: <003f01dc59a7$2bd98b40$838ca1c0$@telus.net> 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="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-ca Thread-Index: AQHuO70FIpoCT8UjwWdl7ErjLgnvJgHh6mEctMfG19A= On 2025.11.13 07:22 Christian Loehle wrote: > On 11/12/25 16:21, Rafael J. Wysocki wrote: >> Hi, >> >> This is a bunch of teo cpuidle governor improvements, some of which are related >> to a bug report discussed recently: >> >> https://lore.kernel.org/linux-pm/CAEmPcwsNMNnNXuxgvHTQ93Mx-q3Oz9U57THQsU_qdcCx1m4w5g@mail.gmail.com/ >> >> The first patch fixes a bug that may cause an overly deep idle state >> to be selected when the scheduler tick has been already stopped. >> >> Patch [2/4] removes an unnecessary function argument. >> >> Patch [3/4] makes teo_update() to use s64 as the data type for its local >> variables more consistently. >> >> The last patch reworks the governor's decay implementation to also decay >> metric values lower than 8. >> > > Tested-by: Christian Loehle > > Test results below, although there really isn't anything interesting in there. > teo-1 to teo-4 (patches 1 to 4 respectively are essentially indistinguishable from > teo-m = mainline) I tested the 4 patch set also, and also found no differences in results above repeatability noise levels. Additionally, I added another patch (patch 5 of 4): "cpuidle: governors: teo: Rework the handling of tick wakeups" [1] Similar findings. Additionally, I added another patch (patch 6 of 4): "sched/idle: disable tick in idle=poll idle entry" [2] And found only one significant improvement, for only one test, but only for the TEO idle governor: Kernel 6.18-rc4: For a 6 pair fast ping-pong test (meaning no work per token stop): teo: 5.53 uSec per loop, reference test 4 of 4 patches: 5.53 uSec per loop, 0% 5 of 4 patches: 5.54 uSec per loop, 0.2% (noise) 6 of 4 patches: 4.77 uSec per loop, 13% better 6 of 4 patches (again): 4.81 uSec per loop, 13% better menu: 5.29 uSec per loop, 4.4% better menu + patch 6 of 4: 5.28 uSec per loop, 4.5% better Idle state 0 usage: 18% with patch 6, teo 11% with menu ~1% with mainline and not patch 6, teo. Idle state 1 usage: almost 0 with patch 6, teo ~6% with menu 27% with mainline and not patch 6, teo. Power: About 100 watts. Patch 6 and teo does increase power use by about a watt or 2. Processor: Intel(R) Core(TM) i5-10600K CPU @ 4.10GHz, 6 cores 12 CPUs. For clarity my branch log: 3993913d7f81 (HEAD -> rjw-teo) sched/idle: disable tick in idle=poll idle entry d9b12b8d62bf cpuidle: governors: teo: Rework the handling of tick wakeups e47178c87272 cpuidle: governors: teo: Decay metrics below DECAY_SHIFT threshold 7fe32e411c2b cpuidle: governors: teo: Use s64 consistently in teo_update() 490e6118e45d cpuidle: governors: teo: Drop redundant function parameter 8f627f86062e cpuidle: governors: teo: Drop incorrect target residency check 6146a0f1dfae (tag: v6.18-rc4, origin/master, origin/HEAD, master) Linux 6.18-rc4 [1] https://lore.kernel.org/linux-pm/6228387.lOV4Wx5bFT@rafael.j.wysocki/ [2] https://lore.kernel.org/linux-pm/aQiWfnnSzxsnwa2o@tpad/