diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-05-26 21:39:37 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-05-27 22:02:07 -0400 |
commit | 6c9692e2d6a2206d8fd75ea247daa47fb75e4a02 (patch) | |
tree | 260a11511b3b629ec1cbcdeb3417e74590028e99 /include/linux/module.h | |
parent | 93c2e105f6bcee231c951ba0e56e84505c4b0483 (diff) |
module: Make the mod_tree stuff conditional on PERF_EVENTS || TRACING
Andrew worried about the overhead on small systems; only use the fancy
code when either perf or tracing is enabled.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Steven Rostedt <rostedt@goodmis.org>
Requested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index ddf35a3368fb..4c1b02e1361d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -282,7 +282,7 @@ struct module { | |||
282 | * | 282 | * |
283 | * Cacheline align here, such that: | 283 | * Cacheline align here, such that: |
284 | * module_init, module_core, init_size, core_size, | 284 | * module_init, module_core, init_size, core_size, |
285 | * init_text_size, core_text_size and ltn_core.node[0] | 285 | * init_text_size, core_text_size and mtn_core::{mod,node[0]} |
286 | * are on the same cacheline. | 286 | * are on the same cacheline. |
287 | */ | 287 | */ |
288 | void *module_init ____cacheline_aligned; | 288 | void *module_init ____cacheline_aligned; |
@@ -296,6 +296,7 @@ struct module { | |||
296 | /* The size of the executable code in each section. */ | 296 | /* The size of the executable code in each section. */ |
297 | unsigned int init_text_size, core_text_size; | 297 | unsigned int init_text_size, core_text_size; |
298 | 298 | ||
299 | #ifdef CONFIG_MODULES_TREE_LOOKUP | ||
299 | /* | 300 | /* |
300 | * We want mtn_core::{mod,node[0]} to be in the same cacheline as the | 301 | * We want mtn_core::{mod,node[0]} to be in the same cacheline as the |
301 | * above entries such that a regular lookup will only touch one | 302 | * above entries such that a regular lookup will only touch one |
@@ -303,6 +304,7 @@ struct module { | |||
303 | */ | 304 | */ |
304 | struct mod_tree_node mtn_core; | 305 | struct mod_tree_node mtn_core; |
305 | struct mod_tree_node mtn_init; | 306 | struct mod_tree_node mtn_init; |
307 | #endif | ||
306 | 308 | ||
307 | /* Size of RO sections of the module (text+rodata) */ | 309 | /* Size of RO sections of the module (text+rodata) */ |
308 | unsigned int init_ro_size, core_ro_size; | 310 | unsigned int init_ro_size, core_ro_size; |