Commit a288bd65 authored by Richard Kennedy's avatar Richard Kennedy Committed by Rusty Russell

module: remove 64 bit alignment padding from struct module with CONFIG_TRACE*

Reorder struct module to remove 24 bytes of alignment padding on 64 bit
builds when the CONFIG_TRACE options are selected. This allows the
structure to fit into one fewer cache lines, and its size drops from 592
to 568 on x86_64.
Signed-off-by: default avatarRichard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 9b73a584
...@@ -368,34 +368,35 @@ struct module ...@@ -368,34 +368,35 @@ struct module
struct module_notes_attrs *notes_attrs; struct module_notes_attrs *notes_attrs;
#endif #endif
/* The command line arguments (may be mangled). People like
keeping pointers to this stuff */
char *args;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* Per-cpu data. */ /* Per-cpu data. */
void __percpu *percpu; void __percpu *percpu;
unsigned int percpu_size; unsigned int percpu_size;
#endif #endif
/* The command line arguments (may be mangled). People like
keeping pointers to this stuff */
char *args;
#ifdef CONFIG_TRACEPOINTS #ifdef CONFIG_TRACEPOINTS
struct tracepoint * const *tracepoints_ptrs;
unsigned int num_tracepoints; unsigned int num_tracepoints;
struct tracepoint * const *tracepoints_ptrs;
#endif #endif
#ifdef HAVE_JUMP_LABEL #ifdef HAVE_JUMP_LABEL
struct jump_entry *jump_entries; struct jump_entry *jump_entries;
unsigned int num_jump_entries; unsigned int num_jump_entries;
#endif #endif
#ifdef CONFIG_TRACING #ifdef CONFIG_TRACING
const char **trace_bprintk_fmt_start;
unsigned int num_trace_bprintk_fmt; unsigned int num_trace_bprintk_fmt;
const char **trace_bprintk_fmt_start;
#endif #endif
#ifdef CONFIG_EVENT_TRACING #ifdef CONFIG_EVENT_TRACING
struct ftrace_event_call **trace_events; struct ftrace_event_call **trace_events;
unsigned int num_trace_events; unsigned int num_trace_events;
#endif #endif
#ifdef CONFIG_FTRACE_MCOUNT_RECORD #ifdef CONFIG_FTRACE_MCOUNT_RECORD
unsigned long *ftrace_callsites;
unsigned int num_ftrace_callsites; unsigned int num_ftrace_callsites;
unsigned long *ftrace_callsites;
#endif #endif
#ifdef CONFIG_MODULE_UNLOAD #ifdef CONFIG_MODULE_UNLOAD
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment