From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753524AbdDKVjH (ORCPT ); Tue, 11 Apr 2017 17:39:07 -0400 Received: from mail.kernel.org ([198.145.29.136]:44100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752918AbdDKVjG (ORCPT ); Tue, 11 Apr 2017 17:39:06 -0400 Date: Tue, 11 Apr 2017 17:39:00 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org Subject: Re: There is a Tasks RCU stall warning Message-ID: <20170411173900.00f4b6c6@gandalf.local.home> In-Reply-To: <20170411173447.0bdb9f77@gandalf.local.home> References: <20170411211802.GA19165@linux.vnet.ibm.com> <20170411173133.52b28cfe@gandalf.local.home> <20170411173447.0bdb9f77@gandalf.local.home> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Steve