From patchwork Tue Apr 15 03:55:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28376 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E4BA2036A for ; Tue, 15 Apr 2014 03:57:06 +0000 (UTC) Received: by mail-ig0-f199.google.com with SMTP id c1sf14576889igq.10 for ; Mon, 14 Apr 2014 20:57:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=HIXM3wsQ1G0POGrAsyzrSebQQosAEDD6B851vpFHalA=; b=D3Ybjs41KnjK+a4FZ3XB6JYFhtkhiSHJxJKJsRNfM62bQmajQg/KmyJ6oQVDCqsQAE Uvl8TFxk8uY3a1TFNyeD1PhXnW0bDV0R1HlYRw30Fmu79+jv9bDGVuzyxM8bQlEBCxv7 ee3EDdIjOmk4QTfQFyVu96kuDRgON4cBqSSHKCjHg4qVZDSJBJ1pD+KLeoqrjkPzAqj2 7exIr8w3LBsWmIuKvbileWhIciHhh2VHFr53VhfjoHsRj02hXkw/LRaJ+ZZeVfLRTKEl dRCRR/2FgSmaw2X3wdtxvhKoaM4NN0U3u4aQ693ooJXmFh3mTvl1vR77HUcKpcMneoN1 4NBA== X-Gm-Message-State: ALoCoQncVhExwCJbSgc5gCg1iMX7D9cjmCuPrzFNSRjwg+bV9/usKGYh0oVeI7s833vWNl1KONhq X-Received: by 10.50.51.68 with SMTP id i4mr346345igo.5.1397534225641; Mon, 14 Apr 2014 20:57:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.38 with SMTP id 35ls3105172qgw.77.gmail; Mon, 14 Apr 2014 20:57:05 -0700 (PDT) X-Received: by 10.52.104.7 with SMTP id ga7mr4762983vdb.29.1397534225456; Mon, 14 Apr 2014 20:57:05 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id qo8si3157293vcb.167.2014.04.14.20.57.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 20:57:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 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.177; Received: by mail-ve0-f177.google.com with SMTP id sa20so8359753veb.36 for ; Mon, 14 Apr 2014 20:57:05 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr33880726vdb.18.1397534225348; Mon, 14 Apr 2014 20:57:05 -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 ib8csp198757vcb; Mon, 14 Apr 2014 20:57:04 -0700 (PDT) X-Received: by 10.68.189.68 with SMTP id gg4mr48161412pbc.42.1397534224282; Mon, 14 Apr 2014 20:57:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hf1si6137380pac.491.2014.04.14.20.57.03; Mon, 14 Apr 2014 20:57:03 -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 S1751278AbaDODz7 (ORCPT + 26 others); Mon, 14 Apr 2014 23:55:59 -0400 Received: from mail-ob0-f181.google.com ([209.85.214.181]:37725 "EHLO mail-ob0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbaDODz6 (ORCPT ); Mon, 14 Apr 2014 23:55:58 -0400 Received: by mail-ob0-f181.google.com with SMTP id gq1so273094obb.12 for ; Mon, 14 Apr 2014 20:55:57 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.74.195 with SMTP id w3mr37930474oev.28.1397534157741; Mon, 14 Apr 2014 20:55:57 -0700 (PDT) Received: by 10.182.28.168 with HTTP; Mon, 14 Apr 2014 20:55:57 -0700 (PDT) In-Reply-To: <534C3C65.1030808@codeaurora.org> References: <74d448a200afd0424fb185e2fb2ac5c31fd6b205.1397492345.git.viresh.kumar@linaro.org> <534C3C65.1030808@codeaurora.org> Date: Tue, 15 Apr 2014 09:25:57 +0530 Message-ID: Subject: Re: [PATCH 22/38] tick-sched: no need to recheck cpu_online() in can_stop_idle_tick() From: Viresh Kumar To: Stephen Boyd Cc: Thomas Gleixner , Lists linaro-kernel , Linux Kernel Mailing List , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Arvind Chauhan , Linaro Networking 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.177 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: , On 15 April 2014 01:22, Stephen Boyd wrote: > On 04/14/14 09:23, Viresh Kumar wrote: >> We have already checked if 'cpu' is online or not and so don't need to recheck >> it. >> >> Signed-off-by: Viresh Kumar > > Hm... doing some git archeology shows fa116ea35ec7 (nohz: no softirq > pending warnings for offline cpus, 2008-12-11), where the cpu_online() > check was added. Before that commit we already checked cpu_online() > similar to how the code is today. Perhaps we need to add a comment here? Okay, I didn't understood what you want completely. You want me to update commit logs or drop this patch and update code? But yes there is one more thing worth mentioning: commit f7ea0fd6 (tick: Don't invoke tick_nohz_stop_sched_tick() if the cpu is offline, May 13 2013), which did this: if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) So, when the patch you mentioned was added, we didn't had this and a recheck of cpu_online() was perhaps required. But it is surely not required anymore. --- 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/ diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 0eed1db..0121421 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -469,6 +469,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) if (unlikely(!cpu_online(cpu))) { if (cpu == tick_do_timer_cpu) tick_do_timer_cpu = TICK_DO_TIMER_NONE; + return false; }