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 77C4733A9D6 for ; Mon, 2 Mar 2026 10:43:41 +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=1772448221; cv=none; b=jOGY4nIDN/uX0irEML2r2EWOhhyYG3rJHVjKBOuwXBhuBbALybHSQNy/Zgv5sgtlUhWQoVrZuPpZoRWaa/HxVZShIHBa+uDeXoFdO7Jm5rG104USTeyGoz3OnwYI/3/etEA18MB5s3zocblGEP4pvo4Moqf/KgfA5n+HS+GDfb8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772448221; c=relaxed/simple; bh=Xqy67+dCh0ek12+gpUArYIAzc9p5CCVBcPY3VFYf8uk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ek8oTNIQpXu/4K1pkHog+3nYVt1hvadMMbzLIv+7pzSZ7HnDOvR6WLX0fy+//Xmfkl8ZdBrOPeCUPOU3cG8XLpvOOBTBqhF+MxgoB3a+DpIvhN0EYRuy42vijwA+E4PQa6+hQxtrTZx6TANoYpQiuq+Ab1JrMUvp+bsQPOCH4Q0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eW+celAt; 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="eW+celAt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DE75C2BC87; Mon, 2 Mar 2026 10:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772448220; bh=Xqy67+dCh0ek12+gpUArYIAzc9p5CCVBcPY3VFYf8uk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eW+celAt3xhZ76vUIcWC35guJrS3rMdcut0I2BnR1339N2bvO38Tc2Is8hpi0c4qO 8iWi+7TKG4aDPa6d6zBMI4vTurnQkwz9eJ5FH1puhV2bNBPA8h24MT7wMp0syTQtsi svTuvPLHZCQIyBY1+Lwoi8OyLjAotFBKSy+JyzVgp1Dxz+EIizQXxAwOdaLKs384CO /i679TMbwyF9aHSSIbqIctJweVt1Ur4fUC4iuI2XaPeJJ8k07p+wB1weur34Tso4Q1 YlF8++J91Jj3CD6uBm4+aCeOtiBqVmSoXYX61ERWSXdqM5r7gcnew0zh9qwOhfdkL7 bF/vKgGDsJRng== Date: Mon, 2 Mar 2026 11:43:38 +0100 From: Frederic Weisbecker To: Thomas Gleixner Cc: LKML , Peter Zijlstra , "Rafael J. Wysocki" , Christian Loehle 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: <20260301192915.171574741@kernel.org> 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? Thanks.