From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 6A3B33126D7 for ; Fri, 13 Mar 2026 15:22:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773415340; cv=none; b=WqkFi2a3j+ybFZVswve0DWSP+kxmkSGMzDcHovqzHfptVHH3Z9It1HXeD/iOu77U3ucsL8+jc6uh6VwHU1xvGJDgsGlEUZkE0l3BieRVPXM7BWpSMpCso30S8z49YLSqZAdUpZUMme3+QblEBHgxyL5DCYZZ3vP3927RgkQvsbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773415340; c=relaxed/simple; bh=Cm+jULF0sYcatM32YQ0xxhsMgKUWuj7BYwxyC7WTbCs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I/2zKgE+QmTnDqVI06jMFEgl8f4qft2Ypeo82OEiqeZnnrh1uMtiTAAxaDtCoFNL9VOvheHEOa11Nipob1f2c9nzdlUDbfT12v/LNM/KxV9RX1hzrrq48Q68VkfNG7qUZX1iwF5D3xUoTFYT6UESC8vCjF2X7VeKvdsq6Sj1yH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io; spf=pass smtp.mailfrom=layalina.io; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b=iwr9BIWO; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=layalina.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b="iwr9BIWO" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-483487335c2so21826435e9.2 for ; Fri, 13 Mar 2026 08:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1773415337; x=1774020137; 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=MOnhKkLzT8lboSu9u82dt1n1tMyjwwzl7YXv4nQ4Z/8=; b=iwr9BIWO2fH4U+Lo1xzAtmVjckgz4xM8iPEhC7ko5K39hS0V0yctLLs3TANiOo/zPR OFUD7n/M1jeEO9UODKI2dtTnT5topVBjYujMkmkLi23Fn0BBdGeJCSEAptE9zWOCG8Jo q7xHl06v2Z5mlkC20b5pyqdS1LTMMWn7zyvOW2Fm6EwXypE53f0zexFjPR6Rzjig4ISa kflQrkoH/K5NwwgD4kMDax8CpAwmTdkVFK1ypLpAvXpIEmRqN3xpEExxfNJxjxWpvVsr 5KOPk+Ct30ZuBsjoS1j5NUdV1d6CZFGn7Hv1gU9FKwrBB9UsrMafffXaQLUw8EEr/bbu 4pOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773415337; x=1774020137; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MOnhKkLzT8lboSu9u82dt1n1tMyjwwzl7YXv4nQ4Z/8=; b=Y79kLaCs0cwsQhhuPxfgqj+q8iKDjxIiXLxLVDQCTaPjg0GL91KRgM1lQP1yOaSwya 6DOYvIlw7u2aa0O2+riezfD/i4vFQ47txktMVyUmi6qyVa5keb2JUSri5/9uDKEZ9z+t ybywTBvV7EnfaaBAUWbCfmGQktFI3T+MOcE/CzoHiRVF3smxoagj5Kcium3uVgwMp3Sl fqiXZPDYhNbWU6wejgKpvNnQeYOT7fH8gNRZtOwizd9utCjbVAhGvHF4S7MteUOSd5kh KnqVDxKTiIQMQ2d+2jp2zH2EhJ1m3hmfGV3m2navMQ7Rs2Vr26pv1B/6IIW5ror3t9z9 RA1A== X-Forwarded-Encrypted: i=1; AJvYcCUnL5j5NXyb6s+/HR0+rfg89afyi8FQkMIXC0EKRdcbgFpI47j4NkKwoOVnhsS8bwI5ZVzwbs4WM58ccwo=@vger.kernel.org X-Gm-Message-State: AOJu0Yyd2cZZQqM+mlNhLj9J1RFdcuqw+YrgH18t1xq7NH778IyrG3Ua WzPqDu2dyNsaWfe9QrMSCVfPQEd1qfxJe3eJOVXzN4beMdd/VI32HnIP63qEhMW4PRQ= X-Gm-Gg: ATEYQzzMx52KuD0ibaAPkh5vBucZmbBmtC/Hi0/YtjWrseScQFsjw0rlQPL6SGuhlg5 H9AXib5NNemySWZtRFgBQoYmT9T5eDyt3+I4hVxnH+Frx9TbxwXA5bNnlI0GoXVrPwSTUosADi3 2F0IPEvk2Z4QB4YY/r8G/1rN5DptBhajCDxoxIuDXBP6IfteFkiArLlwfRZalvpf6Czue1x//5F 0rmix6b4E3T+3HZKGtkbHJDgHYy8u4NIqIEjol4t+x9nYfPrCPWWqU/QyKmORD5p6xGZxoc4wyG 1PYYRpfKoxBqVa+wMnfHmI08hKaGIMkocK9Rhrg/PqWuOCxNJ18TvQLxeZxzDkxdxI7ysSWi/6q nWss5S+wvTLcsR7aQ3Uex7tPwWhyEzZ9BaRbDQl+G4Xuqqx4omrgH38EqSEBoZBVHJ42BBonB9k kR88FtMpr8IQdXgmio+qH08oLXlag= X-Received: by 2002:a05:600c:4e08:b0:485:3eba:ab96 with SMTP id 5b1f17b1804b1-485566ca967mr58899545e9.3.1773415337391; Fri, 13 Mar 2026 08:22:17 -0700 (PDT) Received: from airbuntu ([146.70.179.22]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439fe19b936sm21225895f8f.5.2026.03.13.08.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 08:22:16 -0700 (PDT) Date: Fri, 13 Mar 2026 15:22:11 +0000 From: Qais Yousef To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Thomas Gleixner , Peter Zijlstra , Christian Loehle , Frederic Weisbecker , Aboorva Devarajan Subject: Re: [PATCH v1] sched: idle: Consolidate the handling of two special cases Message-ID: <20260313152211.hs3esa6ls3objtit@airbuntu> References: <4741364.LvFx2qVVIh@rafael.j.wysocki> 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-Disposition: inline In-Reply-To: <4741364.LvFx2qVVIh@rafael.j.wysocki> On 03/13/26 13:25, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > There are two special cases in the idle loop that are handled > inconsistently even though they are analogous. > > The first one is when a cpuidle driver is absent and the default CPU > idle time power management implemented by the architecture code is used. > In that case, the scheduler tick is stopped every time before invoking > default_idle_call(). > > The second one is when a cpuidle driver is present, but there is only > one idle state in its table. In that case, the scheduler tick is never > stopped. > > Since each of these approaches leads to suboptimal choices in some > cases, reconcile them with the help of one simple heuristic. Namely, > stop the tick if the CPU has been woken up by it in the previous > iteration of the idle loop, or let it tick otherwise. > > Signed-off-by: Rafael J. Wysocki > --- Thanks for the comment! Reviewed-by: Qais Yousef