Received: by 10.192.165.148 with SMTP id m20csp2928971imm; Sun, 22 Apr 2018 19:34:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+JXbpvX+QeJgn5O5diyPF6xMpRFGFeBlsR9He/QMMtULIijhoqhEEo3Ih5c5WRH469gDSG X-Received: by 10.99.145.196 with SMTP id l187mr15546497pge.261.1524450857100; Sun, 22 Apr 2018 19:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524450857; cv=none; d=google.com; s=arc-20160816; b=ljxFpaoDCJ+LMz9+rfVPN21EUAWbt7695tHGnm5czN7vQh3qZYy6lOVZdmT6Z/GIN5 48Wb+FaPiIxJSiNVTvbtYWxDYZbosFWwFL5bEuqcVdNWmvHHsj8/KCnHWpVqvYG8bOu7 ncadl7zKq6KNQ8Mh6dyWBEq9xDs/yO+J709o1QLcU3iCSJcEf+OHx74tWUgZozf+3wBq CQ6MReqQgGm+5ZU0nMo43RU6YumVEvKDXNRaaLzipH3+WYswv0+9Wd6o7KT3v50rSXpf KoPyUYhWUsOhxAa+LxZz8T1YfR0s7U5qO241960n6VnSHhs8YoqMEpcyjGoQTZy7r+hi VvYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=KIedSoKIzeLEK03LaT5xZdZbiZm/KHl8hgR54qgfuMg=; b=0GrJPKfC+o2BwEDKYpSOYSJNi64T2+m/WViudJ7svMPzQnw02PTm2n/cD7Zv0rSq6H lA4Fs4+mHI5SA/5KfXXSsJvckevDTkdMH0fScvMADE4YCmKK0SR09F80XqiotqxupKT+ XveWEnXMgXCoNjhgirjMoWBQVgqNjeb1r4aLL1MwZkr5BZCzUQRuo88r+P7oxuPPPF/D Dap+hww0fG+VFDOM/+/vAQhxiBEVQ9FHQ9hO1WJokwM5v6LNC8h2Jl2RdvxoQEa8Otdu mnRvpMSSmvPKuuNU4zGfjH3B3MPCcI8FBcqq/1WioQV1rqbydrLrFgajg4uNjHk5jOuZ V7Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r59-v6si10929783plb.218.2018.04.22.19.34.02; Sun, 22 Apr 2018 19:34:17 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754068AbeDWCbw (ORCPT + 99 others); Sun, 22 Apr 2018 22:31:52 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44340 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753983AbeDWCbY (ORCPT ); Sun, 22 Apr 2018 22:31:24 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3N2UhfR064677 for ; Sun, 22 Apr 2018 22:31:23 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hgk2kws5u-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Sun, 22 Apr 2018 22:31:22 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 22 Apr 2018 22:31:21 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 22 Apr 2018 22:31:17 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3N2VGI32425290; Mon, 23 Apr 2018 02:31:16 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A2773B2050; Sun, 22 Apr 2018 23:33:19 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.149.45]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 66FACB2046; Sun, 22 Apr 2018 23:33:19 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id B0AF716C91FA; Sun, 22 Apr 2018 19:32:28 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel.opensrc@gmail.com, "Paul E. McKenney" Subject: [PATCH tip/core/rcu 16/22] EXP: rcu: Add debugging info to assertion Date: Sun, 22 Apr 2018 19:32:21 -0700 X-Mailer: git-send-email 2.5.2 In-Reply-To: <20180423023150.GA21533@linux.vnet.ibm.com> References: <20180423023150.GA21533@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18042302-2213-0000-0000-0000029781B2 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008903; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01021888; UDB=6.00521536; IPR=6.00801123; MB=3.00020718; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-23 02:31:20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042302-2214-0000-0000-000059DC334B Message-Id: <1524450747-22778-16-git-send-email-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-23_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804230025 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp()) in rcu_gp_cleanup() triggers (inexplicably, of course) every so often. This commit therefore extracts more information. Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 08b72dd02d88..6ad2ac34558f 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -2147,7 +2147,22 @@ static void rcu_gp_cleanup(struct rcu_state *rsp) */ rcu_for_each_node_breadth_first(rsp, rnp) { raw_spin_lock_irq_rcu_node(rnp); - WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp(rnp)); +#ifdef CONFIG_PREEMPT_RCU + if (WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp(rnp))) { + int i; + struct task_struct *t; + + pr_info("%s: grp: %d-%d level: %d ->gp_tasks %p ->exp_tasks %p &->blkd_tasks: %p offset: %u\n", __func__, rnp->grplo, rnp->grphi, rnp->level, rnp->gp_tasks, rnp->exp_tasks, &rnp->blkd_tasks, (unsigned int)offsetof(typeof(*rnp), blkd_tasks)); + pr_cont("\t->blkd_tasks"); + i = 0; + list_for_each_entry(t, &rnp->blkd_tasks, rcu_node_entry) { + pr_cont(" %p", t); + if (++i >= 10) + break; + } + pr_cont("\n"); + } +#endif /* #ifdef CONFIG_PREEMPT_RCU */ WARN_ON_ONCE(rnp->qsmask); WRITE_ONCE(rnp->completed, rsp->gpnum); rdp = this_cpu_ptr(rsp->rda); -- 2.5.2