From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753162AbbJMOvJ (ORCPT ); Tue, 13 Oct 2015 10:51:09 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:34025 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775AbbJMOvH (ORCPT ); Tue, 13 Oct 2015 10:51:07 -0400 Date: Tue, 13 Oct 2015 16:51:05 +0200 From: Frederic Weisbecker To: Peter Zijlstra Cc: Byungchul Park , mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: Re: [PATCH v3 2/2] sched: consider missed ticks when updating global cpu load Message-ID: <20151013145102.GA14876@lerouge> References: <1443771974-27077-1-git-send-email-byungchul.park@lge.com> <1443771974-27077-3-git-send-email-byungchul.park@lge.com> <20151002155906.GD3816@twins.programming.kicks-ass.net> <20151004065819.GS6455@byungchulpark-X58A-UD3R> <20151005081555.GF2903@worktop.programming.kicks-ass.net> <20151012174532.GB1113@lerouge> <20151013070436.GO3604@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151013070436.GO3604@twins.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 On Tue, Oct 13, 2015 at 09:04:36AM +0200, Peter Zijlstra wrote: > On Mon, Oct 12, 2015 at 07:45:35PM +0200, Frederic Weisbecker wrote: > > > I think it will take more than a single patch to rework all of > > > update_process_times(). And we should also ask Thomas for his opinion, > > > but I think we want: > > > > > > - make update_process_times() take a nr_ticks argument > > > - fixup everything below it > > > > > > - fix tick_nohz_handler to not ignore the hrtimer_forward() > > > return value and pass it into > > > tick_sched_handle()/update_process_times(). > > > > > > (assuming this is the right oneshot tick part, tick-common > > > seems to be about periodic timers which aren't used much ?!) > > > > this_nohz_handler() is the low res nohz handler. tick_sched_handle() > > is the high res one (I should rename these). I think we should rather > > find out the pending updates from update_process_times() itself and pass > > it to scheduler_tick() which is the one interested in it. > > tick_nohz_handler() calls tick_sched_handler() ?! Confused I was. So tick_nohz_handler() is the low-res handler and tick_sched_timer() is the high-res (they still need rename I think). Both end up calling tick_sched_handle(). > > And tick_nohz_handler() actually computes the number of ticks -- which > we then happily ignore. > > Why compute it again a few functions down? Ah, you mean we could get the return value of hrtimer_foward()? Both callers use hrtimer_forward() and I think it's fine to call it before tick_sched_handle(). That sounds good!