From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753589AbdDKVot (ORCPT ); Tue, 11 Apr 2017 17:44:49 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42493 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752900AbdDKVor (ORCPT ); Tue, 11 Apr 2017 17:44:47 -0400 Date: Tue, 11 Apr 2017 14:44:43 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: linux-kernel@vger.kernel.org Subject: Re: There is a Tasks RCU stall warning Reply-To: paulmck@linux.vnet.ibm.com References: <20170411211802.GA19165@linux.vnet.ibm.com> <20170411173133.52b28cfe@gandalf.local.home> <20170411173447.0bdb9f77@gandalf.local.home> <20170411173900.00f4b6c6@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170411173900.00f4b6c6@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17041121-0040-0000-0000-0000031171E4 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006919; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00846209; UDB=6.00417368; IPR=6.00624642; BA=6.00005284; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015010; XFM=3.00000013; UTC=2017-04-11 21:44:45 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17041121-0041-0000-0000-000007057AB9 Message-Id: <20170411214443.GH1600@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-11_16:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704110168 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 11, 2017 at 05:39:00PM -0400, Steven Rostedt wrote: > On Tue, 11 Apr 2017 17:34:47 -0400 > Steven Rostedt wrote: > > > On Tue, 11 Apr 2017 17:31:33 -0400 > > Steven Rostedt wrote: > > > > > The thread gets created when I enable the benchmark tracepoint. It just > > > so happens that my test enables *all* tracepoints, which would of > > > course include this one as well. > > > > > > I'll have to look at this code to see why it is getting missed. > > > > Yep, this thread never goes to sleep, but will call cond_resched() > > periodically. This keeps rcu_tasks() from finishing. > > > > Should I add a direct "schedule()" in there instead of a > > cond_resched(), or do you think rcu_tasks should have cond_resched() be > > a quiescent state as well? > > Actually, I believe this found a bug in my trace_event benchmark > thread. On a preempt kernel, cond_resched() is a nop and expects to > only be preempted. Calling schedule() directly should fix everything. I > shouldn't depend on cond_resched() here. Works for me! Hopefully it will also work for your computer. :-) And whew! Glad to see that the stall warnings worked! Thanx, Paul