From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756712AbcASQtn (ORCPT ); Tue, 19 Jan 2016 11:49:43 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36165 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756594AbcASQth (ORCPT ); Tue, 19 Jan 2016 11:49:37 -0500 Date: Tue, 19 Jan 2016 17:49:34 +0100 From: Frederic Weisbecker To: Byungchul Park Cc: Peter Zijlstra , LKML , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Mike Galbraith , Rik van Riel Subject: Re: [PATCH 2/4] sched: Consolidate nohz CPU load update code Message-ID: <20160119164933.GB5317@lerouge> References: <1452700891-21807-1-git-send-email-fweisbec@gmail.com> <1452700891-21807-3-git-send-email-fweisbec@gmail.com> <20160114051840.GA4224@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160114051840.GA4224@X58A-UD3R> 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 On Thu, Jan 14, 2016 at 02:18:40PM +0900, Byungchul Park wrote: > On Wed, Jan 13, 2016 at 05:01:29PM +0100, Frederic Weisbecker wrote: > > #ifdef CONFIG_NO_HZ_COMMON > > +static void __update_cpu_load_nohz(struct rq *this_rq, > > + unsigned long curr_jiffies, > > Do we need to pass current jiffies as a function parameter? I guess we don't, I just wasn't much sure of the possible overhead of READ_ONCE() > > > + unsigned long load, > > + int active) > > +{ > > + unsigned long pending_updates; > > + > > + pending_updates = curr_jiffies - this_rq->last_load_update_tick; > > + if (pending_updates) { > > + this_rq->last_load_update_tick = curr_jiffies; > > + /* > > + * In the regular NOHZ case, we were idle, this means load 0. > > + * In the NOHZ_FULL case, we were non-idle, we should consider > > + * its weighted load. > > + */ > > + __update_cpu_load(this_rq, load, pending_updates, active); > > + } > > +}