From patchwork Fri Jun 15 20:13:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 9337 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 97C7823E5A for ; Fri, 15 Jun 2012 20:13:32 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 68376A18368 for ; Fri, 15 Jun 2012 20:13:32 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so2920166ggn.11 for ; Fri, 15 Jun 2012 13:13:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-content-scanned:x-cbid:x-gm-message-state; bh=I02Hur4XOOQ+l9aFK824vvR87bzwtQzbP9ffQ4vpZSc=; b=iWFfnEQjkceSQs2wnF3nU4YaHtAbvukBTIQU3FmMZ08U/389iwk+BqDjUl14O6xaBF j9O6jSe3NBhMcMHlKEyneMz7iX191yjV9iu435PN7PuBNf59rSLsS8aTz8oCTRfnLncb 0dBkcugyUtVCvw7HHDPrCDHO3JtZ2vao8/eWIjTuE+APXhVMyUz3Vvz2P7Ytojk90J2P nxdm0JLpxHJ7XhVI8ftreywBv8hAWeo4Mn/jDMKv4aYn0dbYE9/wm1mgzciRvQqEl/ok EuAzgKgceLHtqob7WTYOzxITuP7zSiXD8FKaYjPBZd63bTNnxPvxQrxVCE9s0SPw2fxa K2yQ== Received: by 10.42.210.193 with SMTP id gl1mr557766icb.57.1339791212042; Fri, 15 Jun 2012 13:13:32 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp167536ibb; Fri, 15 Jun 2012 13:13:31 -0700 (PDT) Received: by 10.68.225.101 with SMTP id rj5mr23913325pbc.103.1339791210886; Fri, 15 Jun 2012 13:13:30 -0700 (PDT) Received: from e31.co.us.ibm.com (e31.co.us.ibm.com. [32.97.110.149]) by mx.google.com with ESMTPS id qg1si1366912pbc.30.2012.06.15.13.13.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jun 2012 13:13:30 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.149 as permitted sender) client-ip=32.97.110.149; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.149 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 15 Jun 2012 14:13:29 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 15 Jun 2012 14:13:27 -0600 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 9596119D8053; Fri, 15 Jun 2012 20:13:24 +0000 (WET) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5FKDMIC250510; Fri, 15 Jun 2012 14:13:22 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5FKDIrc015485; Fri, 15 Jun 2012 14:13:21 -0600 Received: from paulmck-ThinkPad-W500 ([9.47.24.152]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q5FKDIRJ015444; Fri, 15 Jun 2012 14:13:18 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 0D158E528B; Fri, 15 Jun 2012 13:13:17 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, dhowells@redhat.com, eric.dumazet@gmail.com, darren@dvhart.com, fweisbec@gmail.com, patches@linaro.org, "Paul E. McKenney" , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 01/14] rcu: Fix detection of abruptly-ending stall Date: Fri, 15 Jun 2012 13:13:02 -0700 Message-Id: <1339791195-26389-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <20120615201256.GA26120@linux.vnet.ibm.com> References: <20120615201256.GA26120@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12061520-7282-0000-0000-000009F3A88D X-Gm-Message-State: ALoCoQm/IUSKvHMPvpVcO+cAkDx7bDxrR2PDqMaCXZuBZPYPbNVKNlY8OrElaMvcIWQZBNSThadD From: "Paul E. McKenney" The code that attempts to identify stalls that end just as we detect them is broken by both flavors of initialization failure. This commit therefore properly initializes and computes the count of the number of reasons why the RCU grace period is stalled. Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- kernel/rcutree.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 0da7b88..0f04480 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -732,7 +732,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp) int cpu; long delta; unsigned long flags; - int ndetected; + int ndetected = 0; struct rcu_node *rnp = rcu_get_root(rsp); /* Only let one CPU complain about others per time interval. */ @@ -773,7 +773,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp) */ rnp = rcu_get_root(rsp); raw_spin_lock_irqsave(&rnp->lock, flags); - ndetected = rcu_print_task_stall(rnp); + ndetected += rcu_print_task_stall(rnp); raw_spin_unlock_irqrestore(&rnp->lock, flags); print_cpu_stall_info_end();