Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031531AbbD2CmB (ORCPT ); Tue, 28 Apr 2015 22:42:01 -0400 Received: from mail-vn0-f53.google.com ([209.85.216.53]:36505 "EHLO mail-vn0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031333AbbD2Cl7 (ORCPT ); Tue, 28 Apr 2015 22:41:59 -0400 MIME-Version: 1.0 In-Reply-To: <1430187709-21087-1-git-send-email-joonwoop@codeaurora.org> References: <1430187709-21087-1-git-send-email-joonwoop@codeaurora.org> Date: Wed, 29 Apr 2015 08:11:58 +0530 X-Google-Sender-Auth: ti2_J4aB8qo4HIZhdWfOR7QkwFw Message-ID: Subject: Re: [PATCH 1/2] timer: avoid unnecessary waking up of nohz CPU From: Viresh Kumar To: Joonwoo Park Cc: Thomas Gleixner , Stephen Boyd , Saravana Kannan , "linux-kernel@vger.kernel.org" , John Stultz Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1519 Lines: 36 On Tue, Apr 28, 2015 at 7:51 AM, 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); > } Oops !! Fixes: 9f6d9baaa8ca ("timer: Kick dynticks targets on mod_timer*() calls") Cc: 3.17+ # 3.17+ Reviewed-by: Viresh Kumar -- 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/