From: Peter Zijlstra Date: Wed, 27 May 2015 01:39:37 +0000 (+0930) Subject: module: Optimize __module_address() using a latched RB-tree X-Git-Tag: omap-for-v4.2/fixes-rc1^2~63^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93c2e105f6bcee231c951ba0e56e84505c4b0483;p=pandora-kernel.git module: Optimize __module_address() using a latched RB-tree Currently __module_address() is using a linear search through all modules in order to find the module corresponding to the provided address. With a lot of modules this can take a lot of time. One of the users of this is kernel_text_address() which is employed in many stack unwinders; which in turn are used by perf-callchain and ftrace (possibly from NMI context). So by optimizing __module_address() we optimize many stack unwinders which are used by both perf and tracing in performance sensitive code. Cc: Rusty Russell Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Oleg Nesterov Cc: "Paul E. McKenney" Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Rusty Russell --- Reading git-diff-tree failed