From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751446AbeABPpC (ORCPT + 1 other); Tue, 2 Jan 2018 10:45:02 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41358 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751047AbeABPpB (ORCPT ); Tue, 2 Jan 2018 10:45:01 -0500 Date: Tue, 2 Jan 2018 15:44:57 +0000 From: Morten Rasmussen To: Peter Zijlstra Cc: Vincent Guittot , Ingo Molnar , linux-kernel , Brendan Jackman , Dietmar Eggemann , Morten Rasmussen Subject: Re: [RFC PATCH 2/5] sched: Add NOHZ_STATS_KICK Message-ID: <20180102154457.GB28799@e105550-lin.cambridge.arm.com> References: <20171221102235.088181011@infradead.org> <20171222075934.f6yenvcb2zkf2ysd@hirez.programming.kicks-ass.net> <20171222082915.4lcb7xyyooqyjpia@hirez.programming.kicks-ass.net> <20171222091221.ow5vn3ydx3hj4nht@hirez.programming.kicks-ass.net> <20171222185629.lysjebfifgdwvvhu@hirez.programming.kicks-ass.net> <20171222204247.kyc6ugyyu3ei7zhs@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171222204247.kyc6ugyyu3ei7zhs@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Dec 22, 2017 at 09:42:47PM +0100, Peter Zijlstra wrote: > On Fri, Dec 22, 2017 at 07:56:29PM +0100, Peter Zijlstra wrote: > > Right; but I figured we'd try and do it 'right' and see how horrible it > > is before we try and do funny things. > > So now it should have a 32ms tick for up to .5s when the system goes > completely idle. > > No idea how bad that is.. Does it mean that the 32ms tick will keep going forever if the system doesn't go completely idle? Some tiny background task or a slightly bigger one with a longer period? Do we actually care about stale values if the system is completely idle? Instead of hacking select_task_rq_fair() to kick off a stats update as Vincent already proposed, why can't we just modify Brendan's CPU_NEWLY_IDLE proposal to do a stats update from idle_balance() every 32ms regardless of whether we need to load-balance? This way we should get updates if there is anything running, we don't touch the wake-up path, we don't cause any additional wake-ups, and we don't need a timer. What am I missing?