Skip to content
  • Rusty Russell's avatar
    modules: Take a shortcut for checking if an address is in a module · 3a642e99
    Rusty Russell authored
    
    
    This patch keeps track of the boundaries of module allocation, in
    order to speed up module_text_address().
    
    Inspired by Arjan's version, which required arch-specific defines:
    
    	Various pieces of the kernel (lockdep, latencytop, etc) tend
    	to store backtraces, sometimes at a relatively high
    	frequency. In itself this isn't a big performance deal (after
    	all you're using diagnostics features), but there have been
    	some complaints from people who have over 100 modules loaded
    	that this is a tad too slow.
    
    	This is due to the new backtracer code which looks at every
    	slot on the stack to see if it's a kernel/module text address,
    	so that's 1024 slots.  1024 times 100 modules... that's a lot
    	of list walking.
    
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    3a642e99