From patchwork Wed Mar 26 11:21:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27102 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 02BEB206F9 for ; Wed, 26 Mar 2014 11:22:43 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id lg15sf4241558vcb.7 for ; Wed, 26 Mar 2014 04:22:43 -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=zQPeqgOzcti3c1YvCxFna77y4WdnbUxRx0zbpNGBFaE=; b=Hk6wyaApfkjCwWxMPLpN0pdq0o6sWpd/edL1hRmpYu5gV2z9/8Yh3Sgyql+S/yEGjv pPJCL711M5tWu1ZYR7ITjeXQQj8w9dWyupJjYn9QBltMHELt5RG/zQUoP2E8POIn90Rd sGJtQECmjt/r5h9nocvSpBoObGzDv2O1/amDPDCLz1VOFgUL0SERb8gAX/yS4OrRsu0f qJd3XHjhx951+wfrTVOqhkOKofqw1T/J3xfTB5EouwlfZwCUOkndmD6GQqx+pUjPPZ4w V9shtwv6xK4Gqn4lWeI/Q5Q+flpguArAFFOpCk4J+8FN1VdZMP2XHWxc5/1z2/gCJDNU DAhw== X-Gm-Message-State: ALoCoQntxP65+xf6mpt5slABLYnUQg1OdzOsZy5/dzeU1ugjjqy2RkRgJnBCLOxTP80ypzbW0DBc X-Received: by 10.236.142.212 with SMTP id i60mr15333442yhj.39.1395832963737; Wed, 26 Mar 2014 04:22:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.78 with SMTP id f72ls635486qge.86.gmail; Wed, 26 Mar 2014 04:22:43 -0700 (PDT) X-Received: by 10.220.81.194 with SMTP id y2mr164271vck.29.1395832963619; Wed, 26 Mar 2014 04:22:43 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id sy7si57248vdc.10.2014.03.26.04.22.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 04:22:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id ij19so2166925vcb.38 for ; Wed, 26 Mar 2014 04:22:43 -0700 (PDT) X-Received: by 10.220.10.2 with SMTP id n2mr649558vcn.26.1395832963548; Wed, 26 Mar 2014 04:22:43 -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.78.9 with SMTP id i9csp38051vck; Wed, 26 Mar 2014 04:22:43 -0700 (PDT) X-Received: by 10.66.147.130 with SMTP id tk2mr3905967pab.125.1395832962569; Wed, 26 Mar 2014 04:22:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si13417993pbn.390.2014.03.26.04.22.41; Wed, 26 Mar 2014 04:22:41 -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 S1754550AbaCZLW2 (ORCPT + 26 others); Wed, 26 Mar 2014 07:22:28 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:35860 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754320AbaCZLWY (ORCPT ); Wed, 26 Mar 2014 07:22:24 -0400 Received: by mail-wg0-f42.google.com with SMTP id y10so1179451wgg.1 for ; Wed, 26 Mar 2014 04:22:23 -0700 (PDT) X-Received: by 10.180.188.169 with SMTP id gb9mr29047599wic.17.1395832943076; Wed, 26 Mar 2014 04:22:23 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id lz3sm1813655wic.1.2014.03.26.04.22.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 26 Mar 2014 04:22:22 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 06/14] hrtimer: don't rewrite same value to expires_next in hrtimer_force_reprogram() Date: Wed, 26 Mar 2014 16:51:12 +0530 Message-Id: <479d66f80874a0dedb97a1e98b40d5130386e880.1395832156.git.viresh.kumar@linaro.org> 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.220.179 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: , We have just checked that expires_next.tv64 == cpu_base->expires_next.tv64, and in this case we shouldn't rewrite the same value again. Rewrite code to fix this. Signed-off-by: Viresh Kumar --- kernel/hrtimer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index e5d81ee..32d1504 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -561,11 +561,11 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal) expires_next = expires; } - if (skip_equal && expires_next.tv64 == cpu_base->expires_next.tv64) + if (expires_next.tv64 != cpu_base->expires_next.tv64) + cpu_base->expires_next.tv64 = expires_next.tv64; + else if (skip_equal) return; - cpu_base->expires_next.tv64 = expires_next.tv64; - if (cpu_base->expires_next.tv64 != KTIME_MAX) tick_program_event(cpu_base->expires_next, 1); }