From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754628AbcASNR1 (ORCPT ); Tue, 19 Jan 2016 08:17:27 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:58628 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753636AbcASNRT (ORCPT ); Tue, 19 Jan 2016 08:17:19 -0500 Date: Tue, 19 Jan 2016 14:17:08 +0100 From: Peter Zijlstra To: Frederic Weisbecker Cc: LKML , Byungchul Park , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Mike Galbraith , Rik van Riel Subject: Re: [RFC PATCH 4/4] sched: Upload nohz full CPU load on task enqueue/dequeue Message-ID: <20160119131708.GF6344@twins.programming.kicks-ass.net> References: <1452700891-21807-1-git-send-email-fweisbec@gmail.com> <1452700891-21807-5-git-send-email-fweisbec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452700891-21807-5-git-send-email-fweisbec@gmail.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2016 at 05:01:31PM +0100, Frederic Weisbecker wrote: > The full nohz CPU load is currently accounted on tick restart only. > But there are a few issues with this model: > > _ On tick restart, if cpu_load[0] doesn't contain the load of the actual > tickless load that just ran, we are going to account a wrong value. > And it is very likely to be so given that cpu_load[0] doesn't have > an opportunity to be updated between tick stop and tick restart. > > _ If the runqueue had updates that didn't trigger a tick restart, we > are going to miss those CPU load changes. > > A solution to fix this is to update the CPU load everytime we enqueue > or dequeue a task in the fair runqueue and more than a jiffy occured > since the last update. Would not a much better solution be to do this remotely instead of from one of the hottest functions in the scheduler?