Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752392AbcDSC65 (ORCPT ); Mon, 18 Apr 2016 22:58:57 -0400 Received: from smtprelay0220.hostedemail.com ([216.40.44.220]:46021 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752108AbcDSC6z (ORCPT ); Mon, 18 Apr 2016 22:58:55 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 30,2,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::,RULES_HIT:41:355:379:467:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:5007:6119:6120:6261:6742:7875:7901:7903:7974:8603:9040:10010:10400:10848:10967:11026:11232:11658:11914:12295:12438:12517:12519:12663:12740:13069:13156:13228:13311:13357:13439:14040:14096:14097:14181:14659:14721:21080:21325:30012:30034:30036:30054:30064:30079:30085:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:1:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: frogs47_6abd7145a1c19 X-Filterd-Recvd-Size: 3307 Date: Mon, 18 Apr 2016 22:58:52 -0400 From: Steven Rostedt To: Alexei Starovoitov Cc: Peter Zijlstra , "David S . Miller" , Ingo Molnar , Daniel Borkmann , Arnaldo Carvalho de Melo , Wang Nan , Josef Bacik , Brendan Gregg , , , Subject: Re: [PATCH net-next 2/8] perf, bpf: allow bpf programs attach to tracepoints Message-ID: <20160418225852.55b6a937@grimm.local.home> In-Reply-To: <57158698.9080104@fb.com> References: <1459831974-2891931-1-git-send-email-ast@fb.com> <1459831974-2891931-3-git-send-email-ast@fb.com> <20160418162905.220df2f4@gandalf.local.home> <571554EB.9010702@fb.com> <20160418181631.2efee46e@gandalf.local.home> <57158698.9080104@fb.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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: 1909 Lines: 44 On Mon, 18 Apr 2016 18:15:04 -0700 Alexei Starovoitov wrote: > On 4/18/16 3:16 PM, Steven Rostedt wrote: > Yes. That what I referred to in below 'a struct to pass args'... > But, fine, will try to optimize the size further. > Frankly much bigger .text savings will come from combining > trace_event_raw_event_*() with perf_trace_*() > Especially if you're ok with copying tp args into perf's percpu > buffer first and then copying into ftrace's ring buffer. > Then we can half the number of such auto-generated functions. I'm only fine with that when we filter. Otherwise we just lost all the benefits of zero copy in the first place. > > >> Passing more args or creating a struct to pass args only going to > >> hurt performance without much reduction in .text size. > >> tinyfication folks will disable tracepoints anyway. > >> Note that the most common case is bpf returning 0 and not even > >> calling perf_trace_buf_submit() which is already slow due > >> to so many args passed on stack. > >> This stuff is called million times a second, so every instruction > >> counts. > > > > Note, that doesn't matter if you are bloating the kernel for the 99.9% > > of those that don't use bpf. > > > > Please remember this! Us tracing folks are second class citizens! If > > there's a way to speed up tracing by 10%, but in doing so we cause > > mainline to be hurt by over 1%, we shouldn't be doing it. Tracing and > > hooks on tracepoints are really not used by many people. Don't fall > > into Linus's category of "my code is the most important". That's > > especially true for tracing. > > tracing was indeed not used that often in the past, but > bpf+tracing completely changed the picture. It's no longer just > debugging. It is the first class citizen that runs 24/7 in production > and its performance and lowest overhead are crucial. Still, 99.9% of users don't use it. -- Steve