From patchwork Thu Mar 27 05:23:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27173 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4D7C620062 for ; Thu, 27 Mar 2014 05:24:05 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f11sf5776487qae.11 for ; Wed, 26 Mar 2014 22:24: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:mime-version:delivered-to:from:to:cc:subject :date:message-id: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=A12N7FVdFCFUSfih+YDK4I3sWftVTu73Va9wggnWRzM=; b=bkSdUjCbx0ClqphpfDG8m31rh+f6nFFPnn9J3qZvyZaI93saMF3chhtHFyX1Jlphg5 xwQ/3wbIBEEgH+6pymZv3lwnW6rrg2ZYcX8zsBh5NzKrVl8HgPUj4/H0VxNoQr6v7EAh VBnA43bTZcDo7b5qSKQ0BI/QXdzTB1LDesejfJJ9bdL3UxFUJlgAXu9cmMLlj7TYRuGO QDrS9s9QNGCvFbN+WpYimHatXxSaJgV8ze/0Es5LB3Qqa0AavHobR9gKgRCEVJm7HmoV ZazcV19c2I793gvAoDd+//dyAqIDd0OjyICKfBmfFxBhmiAsqmjk3nG5XaySapROe6Qp mQlA== X-Gm-Message-State: ALoCoQnOEf9QG+e+zOJSbWPbVhx5eHS760VPBsdNyK+4EZHvCbynAVap8pPiaDrMLkQyu8KiUa5F X-Received: by 10.52.236.231 with SMTP id ux7mr28543714vdc.7.1395897845308; Wed, 26 Mar 2014 22:24:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.67 with SMTP id c61ls166121qgc.33.gmail; Wed, 26 Mar 2014 22:24:05 -0700 (PDT) X-Received: by 10.221.20.199 with SMTP id qp7mr508747vcb.24.1395897845186; Wed, 26 Mar 2014 22:24:05 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id sy7si262343vdc.118.2014.03.26.22.24.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 22:24:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 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.174; Received: by mail-vc0-f174.google.com with SMTP id ld13so3553311vcb.19 for ; Wed, 26 Mar 2014 22:24:05 -0700 (PDT) X-Received: by 10.52.142.10 with SMTP id rs10mr54115300vdb.3.1395897845064; Wed, 26 Mar 2014 22:24: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.78.9 with SMTP id i9csp100412vck; Wed, 26 Mar 2014 22:24:04 -0700 (PDT) X-Received: by 10.68.254.5 with SMTP id ae5mr91226633pbd.83.1395897844134; Wed, 26 Mar 2014 22:24:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8si615823pbs.199.2014.03.26.22.24.03; Wed, 26 Mar 2014 22:24: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 S1751655AbaC0FXu (ORCPT + 26 others); Thu, 27 Mar 2014 01:23:50 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:33999 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbaC0FXs (ORCPT ); Thu, 27 Mar 2014 01:23:48 -0400 Received: by mail-wg0-f46.google.com with SMTP id b13so2060956wgh.17 for ; Wed, 26 Mar 2014 22:23:47 -0700 (PDT) X-Received: by 10.180.97.37 with SMTP id dx5mr1752759wib.53.1395897827157; Wed, 26 Mar 2014 22:23:47 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id dd5sm8848644wib.12.2014.03.26.22.23.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 26 Mar 2014 22:23:46 -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 1/2] hrtimer: don't add clock-base to active_bases if already present Date: Thu, 27 Mar 2014 10:53:36 +0530 Message-Id: <3c77c9453e42b7a914c15ef67a8ee142d3543a48.1395897612.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e 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.174 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: , If active_bases already has entry for a particular clock type, then we don't need to rewrite it while queuing a hrtimer. Signed-off-by: Viresh Kumar --- Initially I thought of doing this but then thought better remove active_bases completely and so didn't sent this one. Now it might find some place for itself :). kernel/hrtimer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index da351ad..acfef5f 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -864,8 +864,9 @@ static int enqueue_hrtimer(struct hrtimer *timer, { debug_activate(timer); + if (!timerqueue_getnext(&base->active)) + base->cpu_base->active_bases |= 1 << base->index; timerqueue_add(&base->active, &timer->node); - base->cpu_base->active_bases |= 1 << base->index; /* * HRTIMER_STATE_ENQUEUED is or'ed to the current state to preserve the