From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2029335DA60 for ; Mon, 2 Mar 2026 11:11:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772449900; cv=none; b=GB1oe9kd+bvnneGewNgQN4vgQkuyDSeSOpYakLYkzy5f6PdVXrd6KwJZ+j2OzOD5rTDKc7Hd5mAQHMkk2ZW8YMOlAshKpCaN7ovmRl3KObkba1vqOX5CDnLJQHnDQM95gY1cAA7VsGVOalUDySNoceEy4Hipuy7NzREInhBcrG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772449900; c=relaxed/simple; bh=F+GipKe2aZJgx5TNWJ+f0pRjpM2MZ0VbHhqa4VY59+k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pLbNeo313HBwtpTHypyoNrL09fO3Gntv590fJkOCl2+rVyvHqGhLmhvvoqV0D1BkmOHTBWy5bd/NJopxZckvOhMr63KRkC85naY1z1omSxYrf0OFGK85QywMVBpJBg1fbATMPG51no67cZxlqjOoqTtQQLY1ssmCdnm+6RD9050= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ruk4vs01; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ruk4vs01" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 715AEC19423; Mon, 2 Mar 2026 11:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772449899; bh=F+GipKe2aZJgx5TNWJ+f0pRjpM2MZ0VbHhqa4VY59+k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ruk4vs01zUxwVTgP/Pl+p1p/97CLiI25comj8090yPBJRGBEvrrHkrVD2M5/vVTdx oSI2NjDZMb2u4ZugsLbReu0udJK3+hZdz8ytIaY5yM1hT8hfuqNHsc8iMMlR/JK6mT hS2SzSOyDiKKSoH1+cu1b/2U5C/zpS1jMJqbUbSROQQcN0+IjMhM21W82xsBRDw2Pv G8MUS2htIR7vBdyDCgbov0Jv6KQmTbkZ7huylDKj/RYx7rtbr9srmKFLDXmG4PDv9F r4GjTpHWPlA9AwnzGrv+1087TY2UyK81383dXLnPcXexDXc6ozjv6WnMgkzKyP7wCs 1TV51bZAkJrRA== Date: Mon, 2 Mar 2026 12:11:37 +0100 From: Frederic Weisbecker To: Christian Loehle Cc: Thomas Gleixner , LKML , Peter Zijlstra , "Rafael J. Wysocki" Subject: Re: [patch 2/2] sched/idle: Make default_idle_call() NOHZ aware Message-ID: References: <20260301191959.406218221@kernel.org> <20260301192915.171574741@kernel.org> 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: On Mon, Mar 02, 2026 at 11:03:00AM +0000, Christian Loehle wrote: > On 3/2/26 10:43, Frederic Weisbecker wrote: > > On Sun, Mar 01, 2026 at 08:30:51PM +0100, Thomas Gleixner wrote: > >> Guests fall back to default_idle_call() as there is no cpuidle driver > >> available to them by default. That causes a problem in fully loaded > >> scenarios where CPUs go briefly idle for a couple of microseconds: > >> > >> tick_nohz_idle_stop_tick() is invoked unconditionally which means unless > >> there is timer pending in the next tick, the tick is stopped and a couple > >> of microseconds later when the idle condition goes away restarted. That > >> requires to program the clockevent device twice which implies a VM exit for > >> each reprogramming. > >> > >> It was suggested to remove the tick_nohz_idle_stop_tick() invocation from > >> the default idle code, but would be counterproductive. It would not allow > >> the host to go into deeper idle states when the guest CPU is fully idle as > >> it has to maintain the periodic tick. > >> > >> Cure this by implementing a trivial moving average filter which keeps track > >> of the recent idle recidency time and only stop the tick when the average > >> is larger than a tick. > >> > >> Signed-off-by: Thomas Gleixner > > > > Shouldn't there be instead a new dedicated cpuidle driver with proper governor support? > > I think a dummy cpuidle driver is an option, but calling into any governor > seems overkill IMO, it presents an option to the user where there really is > none (after all the cpuidle governor would just make a boolean decision as > there are no states). I must confess I don't fully understand the picture with the non-existent states but what Thomas is doing in his patch is basically an ad-hoc implementation of cpuidle governor decision whether or not to stop the tick. Thanks.