On Tue, 3 Jan 2017 11:54:02 +0100 Peter Zijlstra <pet...@infradead.org> 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