From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934691AbeCEMm3 (ORCPT ); Mon, 5 Mar 2018 07:42:29 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:58306 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933014AbeCEMm2 (ORCPT ); Mon, 5 Mar 2018 07:42:28 -0500 Date: Mon, 5 Mar 2018 13:42:17 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Thomas Gleixner , Frederic Weisbecker , Paul McKenney , Thomas Ilsche , Doug Smythies , Rik van Riel , Aubrey Li , Mike Galbraith , LKML , Linux PM Subject: Re: [RFC/RFT][PATCH 6/7] sched: idle: Predict idle duration before stopping the tick Message-ID: <20180305124217.GZ25181@hirez.programming.kicks-ass.net> References: <1657351.s4RTvEoqBQ@aspire.rjw.lan> <2048240.1dZKXsSxFh@aspire.rjw.lan> <20180305114542.GP25201@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 05, 2018 at 01:07:07PM +0100, Rafael J. Wysocki wrote: > On Mon, Mar 5, 2018 at 12:50 PM, Rafael J. Wysocki wrote: > > On Mon, Mar 5, 2018 at 12:45 PM, Peter Zijlstra wrote: > >> So I think this is entirely wrong, I would much rather see something > >> like: > >> > >> tick_nohz_idle_go_idle(next_state->nohz); > >> > >> Where the selected state itself has the nohz property or not. > > > > Can you elaborate here, I'm not following? > > > >> We can always insert an extra state at whatever the right boundary point > >> is for nohz if it doesn't line up with an existing point. > > OK, I guess I know what you mean: to add a state flag meaning "stop > the tick if this state is selected". Yes, that. > That could work, but I see problems, like having to go through all of > the already defined states and deciding what to do with them. Shouldn't be too hard, upon registering a cpuidle driver to the cpuidle core, the core could go through the provided states and flag all those < TICK_USEC as not stopping, all those > TICK_USEC as stopping and splitting the state we'd select for TICK_NSEC sleeps, stopping it for < and disabling it for >.