From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968103AbdADOXi (ORCPT ); Wed, 4 Jan 2017 09:23:38 -0500 Received: from smtprelay0141.hostedemail.com ([216.40.44.141]:55147 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751688AbdADOXd (ORCPT ); Wed, 4 Jan 2017 09:23:33 -0500 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:2393:2553:2559:2562:2689:2740:2895:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:5007:6261:7875:7903:8540:9010:10004:10400:10848:10967:11026:11232:11658:11914:12438:12663:12740:12760:12895:13069:13255:13311:13357:13439:14096:14097:14181:14659:14721:21080:21433:21525:30054: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:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: copy73_66e4890392d07 X-Filterd-Recvd-Size: 2275 Date: Wed, 4 Jan 2017 09:21:45 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: Masami Hiramatsu , Ingo Molnar , Josh Poimboeuf , linux-kernel@vger.kernel.org, Ananth N Mavinakayanahalli , Thomas Gleixner , "H . Peter Anvin" , Andrey Konovalov Subject: Re: [PATCH tip/master v3] kprobes: extable: Identify kprobes' insn-slots as kernel text area Message-ID: <20170104092145.23c0e24d@gandalf.local.home> In-Reply-To: <20170103105402.GB25813@worktop.programming.kicks-ass.net> References: <20161226133012.347f7e45dbf8a8d671ea07fb@kernel.org> <148281924021.12148.14275351848773920571.stgit@devbox> <20170103105402.GB25813@worktop.programming.kicks-ass.net> 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, 3 Jan 2017 11:54:02 +0100 Peter Zijlstra wrote: > How many entries should one expect on that list? I spend quite a bit of > time reducing the cost of is_module_text_address() a while back and see > that both ftrace (which actually needs this to be fast) and now > kprobes have linear list walks in here. > > I'm assuming the ftrace thing to be mostly empty, since I never saw it > on my benchmarks back then, but it is something Steve should look at I > suppose. Yeah, that do_for_each_ftrace_op() loop iterates all the users that have connected to function tracing. Which in your case is probably at most 2 (one for ftrace and one for perf). You could get more by creating instances and enabling function tracing there too. Oh, and the stack tracer could add its own. Hmm, with the addition of live kernel patching, this list could get larger. As you can have one per updated function. But heh, that's just part of the overhead for live patching ;-) -- Steve