From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753185Ab1H2Pv0 (ORCPT ); Mon, 29 Aug 2011 11:51:26 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52313 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751833Ab1H2PvZ convert rfc822-to-8bit (ORCPT ); Mon, 29 Aug 2011 11:51:25 -0400 Subject: Re: [PATCH 16/32] nohz/cpuset: Wake up adaptive nohz CPU when a timer gets enqueued From: Peter Zijlstra To: Frederic Weisbecker Cc: LKML , Andrew Morton , Anton Blanchard , Avi Kivity , Ingo Molnar , Lai Jiangshan , "Paul E . McKenney" , Paul Menage , Stephen Hemminger , Thomas Gleixner , Tim Pepper Date: Mon, 29 Aug 2011 17:51:03 +0200 In-Reply-To: <1313423549-27093-17-git-send-email-fweisbec@gmail.com> References: <1313423549-27093-1-git-send-email-fweisbec@gmail.com> <1313423549-27093-17-git-send-email-fweisbec@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.0.2- Message-ID: <1314633063.2816.103.camel@twins> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2011-08-15 at 17:52 +0200, Frederic Weisbecker wrote: > Wake up a CPU when a timer list timer is enqueued there and > the CPU is in adaptive nohz mode. Sending an IPI to it makes > it reconsidering the next timer to program on top of recent > updates. > > include/linux/sched.h | 4 ++-- > kernel/sched.c | 33 ++++++++++++++++++++++++++++++++- > kernel/time/tick-sched.c | 5 ++++- > kernel/timer.c | 2 +- > 4 files changed, 39 insertions(+), 5 deletions(-) So here I would have expected timer_needs_cpu() and an addition to tick_nohz_can_stop_tick(). Why does sched.c get touched at all? Also, all the delta_jiffies stuff in the current tick_nohz_stop_sched_tick() deals with this, why duplicate the logic?