From patchwork Fri Jun 22 15:34:56 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: 9579 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 4D59823E37 for ; Fri, 22 Jun 2012 15:37:55 +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 1DE65A18315 for ; Fri, 22 Jun 2012 15:37:55 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so1758124ggn.11 for ; Fri, 22 Jun 2012 08:37:54 -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=jWJ599FIoYfFY/YTl9VmY5Ffj/Fcwo5YbtHiIAG4VU4=; b=QXOInIoYVhBlE+PHP96ywp7pZOq1XfxngveY4n078NXWFn6czy9wRK1t+zM+yjX0f2 AnhkARmvOBxELHxAROaGqpconAo+oKJzHfQx2f1yEw1L2GN3f7UDMkX+IxVBO5wFpiGz QKU3BinGQV0e6tsFXex1usBfb2YG414apl5MD8nSyZnsWaGLKr/ssuoTkgW3kbWxrXHL TL7JtmiQh6g8UuQzTKE4dXlRr75WFbxmkX8TdGEVaFFnTv5EgLLBCQHU8jkUtRh3CHom kMj16dd7RNycKJsGsf0HmL1z3vcy7se3spF6FnCp/zdrwvdSymBNNz500YV+7XrNnHn2 BYdQ== Received: by 10.50.160.198 with SMTP id xm6mr2227616igb.0.1340379474654; Fri, 22 Jun 2012 08:37:54 -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 v20csp72499ibb; Fri, 22 Jun 2012 08:37:54 -0700 (PDT) Received: by 10.68.231.40 with SMTP id td8mr10947744pbc.150.1340379473874; Fri, 22 Jun 2012 08:37:53 -0700 (PDT) Received: from e35.co.us.ibm.com (e35.co.us.ibm.com. [32.97.110.153]) by mx.google.com with ESMTPS id qa1si10084597pbb.126.2012.06.22.08.37.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jun 2012 08:37:53 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.153 as permitted sender) client-ip=32.97.110.153; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.153 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Jun 2012 09:37:53 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 22 Jun 2012 09:37:50 -0600 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 1BF1C1FF0020; Fri, 22 Jun 2012 15:36:16 +0000 (WET) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5MFZZvh105282; Fri, 22 Jun 2012 09:35:51 -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 q5MFZFrk023073; Fri, 22 Jun 2012 09:35:16 -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 q5MFZEbm023033; Fri, 22 Jun 2012 09:35:14 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id A21DAE71A0; Fri, 22 Jun 2012 08:35:14 -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, sbw@mit.edu, patches@linaro.org, "Paul E. McKenney" , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 01/17] rcu: Fix detection of abruptly-ending stall Date: Fri, 22 Jun 2012 08:34:56 -0700 Message-Id: <1340379312-6684-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <20120622153501.GA6626@linux.vnet.ibm.com> References: <20120622153501.GA6626@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12062215-6148-0000-0000-000006F5FE02 X-Gm-Message-State: ALoCoQnOoQyQR9THAA8qvGU1mAoZ+MtDEG3ms9ybemQiFnLfkXVG9efo1ldgjUQ3RpFEYnC8Nxb4 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();