From patchwork Mon Apr 14 16:23:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28353 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CF79A20534 for ; Mon, 14 Apr 2014 16:32:01 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id n16sf45769002oag.1 for ; Mon, 14 Apr 2014 09:32:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=RxJCenJbwTnQU6uP8xmPyMzwqJYZiD7YwEHCyjVdMYE=; b=O6JC5zkJqVIeSzVpDR7mSQOfUrcDTIRxSacyAMrxz/941bk9CkIBuqr7Uvc038Xhn2 ooMJq26KjUz8Tx7XHIAiALlxD78JTZODqi7EKrck/RcWLYZ8EuT25XCPDoTo33HZYn1X FzrTRzzEjShAQIqG2H/QIn5rS7JgKsrvfNHStnCCZwYbCY5Q5D27QirwKSf/+yynllpc gKebth0QL04Nb1UDBOAIFoPcpbKsZdLQzLr1c2FImTKp3G9dLvhDNbDEjO+xOqs1hO6V Je7FsnndBDvwmtF8MH9ks/PxDxgF+hMS8Vt//+uNwJIaoX78D/miqjEp669sv8VtwK/r cAcA== X-Gm-Message-State: ALoCoQmMR0vczwHEig515skz12dfWoYVZRxepgO2oTJRrSt3MKKHhGgMdnQit9QZEm1llz+8Qr6w X-Received: by 10.182.3.68 with SMTP id a4mr17261477oba.16.1397493121423; Mon, 14 Apr 2014 09:32:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.244 with SMTP id f107ls2826709qgf.65.gmail; Mon, 14 Apr 2014 09:32:01 -0700 (PDT) X-Received: by 10.58.55.170 with SMTP id t10mr1964344vep.29.1397493121256; Mon, 14 Apr 2014 09:32:01 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id sc12si2837578veb.79.2014.04.14.09.32.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:32:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so7812917veb.34 for ; Mon, 14 Apr 2014 09:32:01 -0700 (PDT) X-Received: by 10.52.3.129 with SMTP id c1mr1032532vdc.37.1397493121150; Mon, 14 Apr 2014 09:32:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp163219vcb; Mon, 14 Apr 2014 09:32:00 -0700 (PDT) X-Received: by 10.68.218.3 with SMTP id pc3mr45266355pbc.71.1397493120460; Mon, 14 Apr 2014 09:32:00 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ep2si9154121pbb.88.2014.04.14.09.31.59; Mon, 14 Apr 2014 09:31:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754023AbaDNQbu (ORCPT + 26 others); Mon, 14 Apr 2014 12:31:50 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:60388 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755236AbaDNQ1q (ORCPT ); Mon, 14 Apr 2014 12:27:46 -0400 Received: by mail-pa0-f41.google.com with SMTP id fa1so8483281pad.0 for ; Mon, 14 Apr 2014 09:27:46 -0700 (PDT) X-Received: by 10.66.144.102 with SMTP id sl6mr44431050pab.96.1397492866040; Mon, 14 Apr 2014 09:27:46 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id pb7sm82532109pac.10.2014.04.14.09.27.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:27:45 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Arvind.Chauhan@arm.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 32/38] tick-sched: add comment about 'idle_active' in tick_nohz_idle_exit() Date: Mon, 14 Apr 2014 21:53:54 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The sequence of calls for dynticks CPUs was a bit confusing and so adding a comment in tick_nohz_idle_exit() routine to mention it clearly. All information required is in commit and this conversation with Frederic. https://lkml.org/lkml/2014/4/10/355 Suggested-by: Frederic Weisbecker Signed-off-by: Viresh Kumar --- kernel/time/tick-sched.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index f1bc258..85a4e90 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -925,6 +925,22 @@ void tick_nohz_idle_exit(void) ts->inidle = 0; + /* + * Can idle_active be false here? + * Ideally this would be the sequence of calls: + * - tick_nohz_idle_enter(), i.e. idle_active = true; + * - local_irq_disable() + * - IDLE + * - wake up due to IPI or other interrupt + * - local_irq_enable() + * - tick_nohz_irq_enter(), i.e. idle_active = false; + * - tick_nohz_irq_exit(), i.e. idle_active = true; This is not called + * in case of IPI's as need_resched() will prevent that in + * tick_irq_exit(), as we don't need to account any more for idle time + * or try to enter dyntics mode (We are going to exit idle state). + * + * - tick_nohz_idle_exit() + */ if (ts->idle_active || ts->tick_stopped) now = ktime_get();