Message ID | e64bf28d15929bdafcc0970644b6d880650c1cd8.1404888801.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBJOP6OOQKGQEUDDT5AI@linaro.org> 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 4A451203F4 for <linaro@patches.linaro.org>; Wed, 9 Jul 2014 06:56:38 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id o6sf7470327oag.1 for <linaro@patches.linaro.org>; Tue, 08 Jul 2014 23:56:37 -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=E6HXf1GEDbcd1GpxB98WMQjhrmEHJmyefA2GuaWHz0g=; b=GZnpzGVf3qsd2kUxUyik/1ZIjE7xbIye+cDvNibRH9Vq7Sxl0V9MZmpyLzSGPBmssK dUjpcWjLRUtijJx0xf4jQYmeLnX/cmr963djsHqYREU7QZDlmzuIDI+XpUS3LaeqJFuD fXp94wo5AOUegjjxnoSP1CCGkvml3qZnuSzio4UiZpt3BUg73Y+TzgK78War/XQ3aba/ vFxkys+TPNChmjd/7FNeFha9ww6dEa8lgnd1IjYm8c8fWjHS7EbS0moHpP5wyrt7mhfa 5rAlXLA1busiRhnvi/s+MvsBF2V7mWlgbRUbTCNTld8u5UCSKBnC4+tlG0tDDy90e7ve 1Uwg== X-Gm-Message-State: ALoCoQlGcHAg/ZYdoPl6xEet8h53U2j7PNhguhtorYnRx8xbBlLXBxEEGIg5a97pqZ2o0qB8070R X-Received: by 10.50.73.197 with SMTP id n5mr1112223igv.1.1404888997872; Tue, 08 Jul 2014 23:56:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.145 with SMTP id 17ls264441qgl.95.gmail; Tue, 08 Jul 2014 23:56:37 -0700 (PDT) X-Received: by 10.220.68.140 with SMTP id v12mr37825045vci.13.1404888997768; Tue, 08 Jul 2014 23:56:37 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id ux9si20729469vdc.7.2014.07.08.23.56.37 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Jul 2014 23:56:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so6497301vcb.31 for <patchwork-forward@linaro.org>; Tue, 08 Jul 2014 23:56:37 -0700 (PDT) X-Received: by 10.220.203.134 with SMTP id fi6mr38036790vcb.18.1404888997691; Tue, 08 Jul 2014 23:56:37 -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.221.37.5 with SMTP id tc5csp20659vcb; Tue, 8 Jul 2014 23:56:37 -0700 (PDT) X-Received: by 10.68.104.66 with SMTP id gc2mr39887291pbb.17.1404888996868; Tue, 08 Jul 2014 23:56:36 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cv2si45312014pbc.135.2014.07.08.23.56.36; Tue, 08 Jul 2014 23:56:36 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754815AbaGIG40 (ORCPT <rfc822;yazen.ghannam@linaro.org> + 28 others); Wed, 9 Jul 2014 02:56:26 -0400 Received: from mail-qa0-f54.google.com ([209.85.216.54]:41856 "EHLO mail-qa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542AbaGIG4Z (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 9 Jul 2014 02:56:25 -0400 Received: by mail-qa0-f54.google.com with SMTP id s7so1740078qap.41 for <linux-kernel@vger.kernel.org>; Tue, 08 Jul 2014 23:56:24 -0700 (PDT) X-Received: by 10.224.123.71 with SMTP id o7mr66228287qar.38.1404888984345; Tue, 08 Jul 2014 23:56:24 -0700 (PDT) Received: from localhost (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id m92sm31305343qgd.29.2014.07.08.23.56.19 for <multiple recipients> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 08 Jul 2014 23:56:23 -0700 (PDT) From: Viresh Kumar <viresh.kumar@linaro.org> To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, arvind.chauhan@arm.com, preeti@linux.vnet.ibm.com, khilman@linaro.org, Viresh Kumar <viresh.kumar@linaro.org>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Darren Hart <dvhart@linux.intel.com> Subject: [RFC 5/7] futex: don't check for active hrtimer after adding it Date: Wed, 9 Jul 2014 12:25:37 +0530 Message-Id: <e64bf28d15929bdafcc0970644b6d880650c1cd8.1404888801.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <cover.1404888801.git.viresh.kumar@linaro.org> References: <cover.1404888801.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1404888801.git.viresh.kumar@linaro.org> References: <cover.1404888801.git.viresh.kumar@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/kernel/futex.c b/kernel/futex.c index b632b5f..4847efc 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2083,11 +2083,8 @@ static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, queue_me(q, hb); /* Arm the timer */ - if (timeout) { + if (timeout) hrtimer_start_expires(&timeout->timer, HRTIMER_MODE_ABS); - if (!hrtimer_active(&timeout->timer)) - timeout->task = NULL; - } /* * If we have been removed from the hash list, then another task
hrtimer_start*() family never fails to enqueue a hrtimer to a clock-base. The only special case is when the hrtimer was in past. If it is getting enqueued to local CPUs's clock-base, we raise a softirq and exit, else we handle that on next interrupt on remote CPU. At several places in the kernel, we try to make sure if hrtimer was added properly or not by calling hrtimer_active(), like: hrtimer_start(timer, expires, mode); if (hrtimer_active(timer)) { /* Added successfully */ } else { /* Was added in the past */ } As hrtimer_start*() never fails, hrtimer_active() is guaranteed to return '1'. So, there is no point calling hrtimer_active(). This patch updates futex core to get this fixed. Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- kernel/futex.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)