From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbdDJScq (ORCPT ); Mon, 10 Apr 2017 14:32:46 -0400 Received: from mail.kernel.org ([198.145.29.136]:49602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbdDJScp (ORCPT ); Mon, 10 Apr 2017 14:32:45 -0400 Date: Mon, 10 Apr 2017 14:32:40 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Mathieu Desnoyers Subject: Re: [PATCH 7/7 v3] tracing: Make sure rcu_irq_enter() can work for trace_*_rcuidle() trace events Message-ID: <20170410143240.6828c13c@gandalf.local.home> In-Reply-To: <20170410182901.GX1600@linux.vnet.ibm.com> References: <20170410181005.420764935@goodmis.org> <20170410181151.708413295@goodmis.org> <20170410182901.GX1600@linux.vnet.ibm.com> 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 Mon, 10 Apr 2017 11:29:01 -0700 "Paul E. McKenney" wrote: > On Mon, Apr 10, 2017 at 02:10:12PM -0400, Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > > > Stack tracing discovered that there's a small location inside the RCU > > infrastructure where calling rcu_irq_enter() does not work. As trace events > > use rcu_irq_enter() it must make sure that it is functionable. A check > > against rcu_irq_enter_disabled() is added with a WARN_ON_ONCE() as no trace > > event should ever be used in that part of RCU. If the warning is triggered, > > then the trace event is ignored. > > > > Restructure the __DO_TRACE() a bit to get rid of the prercu and postrcu, > > and just have an rcucheck that does the work from within the _DO_TRACE() > > macro. gcc optimization will compile out the rcucheck=0 case. > > > > Link: http://lkml.kernel.org/r/20170405093207.404f8deb@gandalf.local.home > > > > Acked-by: Mathieu Desnoyers > > Signed-off-by: Steven Rostedt (VMware) > > Acked-by: Paul E. McKenney > > As an aside, it looks like the rcu_irq_enter_disabled() settings > in the RCU idle-entry code could be placed under CONFIG_PROVE_RCU=y > should my idle-entry-overhead concerns prove to be well-founded. > The errors would be caught during testing, but no production-side > overhead. Even with the underscored __this_cpu_*() calls? > > Again, I am not necessarily agitating for this change now, just getting > this possibility on the record. ;-) That would be easy to add :-) But we can do that at a later time. -- Steve