Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030994AbbD1V7I (ORCPT ); Tue, 28 Apr 2015 17:59:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46305 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030811AbbD1V7G (ORCPT ); Tue, 28 Apr 2015 17:59:06 -0400 Message-ID: <554002A8.4070008@codeaurora.org> Date: Tue, 28 Apr 2015 14:59:04 -0700 From: Stephen Boyd User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Joonwoo Park , tglx@linutronix.de CC: skannan@codeaurora.org, linux-kernel@vger.kernel.org, John Stultz , Viresh Kumar , Frederic Weisbecker Subject: Re: [PATCH 1/2] timer: avoid unnecessary waking up of nohz CPU References: <1430187709-21087-1-git-send-email-joonwoop@codeaurora.org> In-Reply-To: <1430187709-21087-1-git-send-email-joonwoop@codeaurora.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1634 Lines: 40 On 04/27/15 19:21, Joonwoo Park wrote: > At present, internal_add_timer() examines flags with 'base' which doesn't > contain flags. Examine with 'timer->base' to avoid unnecessary waking up > of nohz CPU when timer base has TIMER_DEFERRABLE. > > CC: Thomas Gleixner > CC: John Stultz > Signed-off-by: Joonwoo Park > --- > kernel/time/timer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/time/timer.c b/kernel/time/timer.c > index 2ece3aa..e5d5733c 100644 > --- a/kernel/time/timer.c > +++ b/kernel/time/timer.c > @@ -434,7 +434,7 @@ static void internal_add_timer(struct tvec_base *base, struct timer_list *timer) > * require special care against races with idle_cpu(), lets deal > * with that later. > */ > - if (!tbase_get_deferrable(base) || tick_nohz_full_cpu(base->cpu)) > + if (!tbase_get_deferrable(timer->base) || tick_nohz_full_cpu(base->cpu)) > wake_up_nohz_cpu(base->cpu); > } > This looks like a fix for commit 9f6d9baaa8ca (timer: Kick dynticks targets on mod_timer*() calls, 2014-06-22) which changed the code to use base instead of timer->base when it moved this condition from add_timer_on() into internal_add_timer(). Is that right? -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/