From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753067AbcBAGeI (ORCPT ); Mon, 1 Feb 2016 01:34:08 -0500 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:59111 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805AbcBAGeG (ORCPT ); Mon, 1 Feb 2016 01:34:06 -0500 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Mon, 1 Feb 2016 15:33:37 +0900 From: Byungchul Park To: Frederic Weisbecker Cc: Peter Zijlstra , LKML , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Mike Galbraith , Rik van Riel Subject: Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Message-ID: <20160201063337.GC29804@X58A-UD3R> References: <1452700891-21807-1-git-send-email-fweisbec@gmail.com> <1452700891-21807-2-git-send-email-fweisbec@gmail.com> <20160119130857.GC6344@twins.programming.kicks-ass.net> <20160119162210.GA5317@lerouge> <20160119185647.GA6357@twins.programming.kicks-ass.net> <20160119223320.GD5317@lerouge> <20160120054335.GE9882@X58A-UD3R> <20160120102614.GA5310@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160120102614.GA5310@X58A-UD3R> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 20, 2016 at 07:26:14PM +0900, Byungchul Park wrote: > On Wed, Jan 20, 2016 at 02:43:35PM +0900, Byungchul Park wrote: > > > > It looks very tricky. I have a question. Do we have to call the > > scheduler_tick() even while the tick is stopped? IMHO, it seems to be > > ok even if we won't call it while the tick is stopped. Wrong? I mean, > > > > The reason why I asked is that, scheduler_tick() looks to be a > scheduler callback for *periodic tick*. IMHO, we need to choose one of > these two. > > 1) Make scheduler_tick() can handle it, not only for the periodic tick > but also for the tick-like event during tick-stopped. But I am not sure > if this is the right way. > > 2) Distinguish the periodic tick from the tick-like event by which we > can handle rcu callback, irq work and so on, so that the periodic tick > handler only handles periodic stuff either locally or remotely, while > the tick-like event handler only does its purpose. I think this is > better, I am sure though. ^^^ not > > > --- > > > > diff --git a/kernel/time/timer.c b/kernel/time/timer.c > > index bbc5d11..774adc2 100644 > > --- a/kernel/time/timer.c > > +++ b/kernel/time/timer.c > > @@ -1422,7 +1422,8 @@ void update_process_times(int user_tick) > > if (in_irq()) > > irq_work_tick(); > > #endif > > - scheduler_tick(); > > + if (!tick_nohz_tick_stopped()) > > + scheduler_tick(); > > run_posix_cpu_timers(p); > > } > > > > --- > > > > hm ???