Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751215AbdFBAr5 (ORCPT ); Thu, 1 Jun 2017 20:47:57 -0400 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:47183 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750851AbdFBAr4 (ORCPT ); Thu, 1 Jun 2017 20:47:56 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2198:2199:2200:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3867:3870:3871:3872:3873:3874:5007:6119:6261:7875:7903:10004:10400:10848:10967:11232:11658:11914:12296:12663:12740:12760:12895:13069:13153:13228:13311:13357:13439:14096:14097:14181:14659:14721:14777:21080:21324:21433:21627:30012:30054:30056:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: slip73_443187cc4e959 X-Filterd-Recvd-Size: 2591 Date: Thu, 1 Jun 2017 20:47:35 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Vlastimil Babka , Lu Baolu , Greg Kroah-Hartman , Ingo Molnar , Mathias Nyman , tglx@linutronix.de, linux-usb@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Michal Kubecek Subject: Re: [PATCH v8 2/5] usb: early: add driver for xhci debug capability Message-ID: <20170601204735.4e1399eb@vmware.local.home> In-Reply-To: <20170601122551.3x6p3g2jofvwi7gk@hirez.programming.kicks-ass.net> References: <1490083293-3792-1-git-send-email-baolu.lu@linux.intel.com> <1490083293-3792-3-git-send-email-baolu.lu@linux.intel.com> <592E3817.4030402@linux.intel.com> <592F8BF3.4070004@linux.intel.com> <56601eff-386e-3405-abf2-51a163201253@suse.cz> <20170601122551.3x6p3g2jofvwi7gk@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.14.1 (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 Content-Length: 1073 Lines: 25 On Thu, 1 Jun 2017 14:25:51 +0200 Peter Zijlstra wrote: > On Thu, Jun 01, 2017 at 10:15:24AM +0200, Vlastimil Babka wrote: > > Thanks. I didn't make it clear that the trace_printk() warning is > > there even if the code using it doesn't actually execute (i.e. I > > didn't specify any early_printk bootparam). There are some roastedy > > tricks to detect the potential users, so that the buffers can be > > allocated in advance to allow the first trace_printk() from any > > context, I guess. > > > > I'm not sure if there's a way to change it so that your driver > > reports the trace_printk usage only in response to the bootparam > > (which could also be a safe point to allocate ftrace buffers?). > > No, nor do we want to. There should not be a single caller to > trace_printk() in normal kernels. Correct. If you find a trace_printk() that would be useful in a production environment, then make it a tracepoint. That's why I have that nasty banner, to make sure trace_printk()s are not the "quick way" to add tracepoint hacks. -- Steve