Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [RFC][PATCH] module: Optimize __module_address() using a latched RB-tree | Date | Fri, 27 Feb 2015 22:21:26 +1030 |
| |
Peter Zijlstra <peterz@infradead.org> writes: > On Thu, Feb 26, 2015 at 12:43:09PM +0100, Peter Zijlstra wrote: > > Assuming struct module is cacheline aligned, Rusty? from what I can find > its squirreled away in some data structure: > > mod = (void *)info->sechdrs[info->index.mod].sh_addr > > And I can't seem to quickly find its alignment. If its not cacheline > aligned, can we make it so?
If the ELF says to align it, it will be aligned. Thus your patch below should make it Just Work:
> @@ -278,7 +276,7 @@ > int (*init)(void); > > /* If this is non-NULL, vfree after init() returns */ > - void *module_init; > + void *module_init ____cacheline_aligned; > > /* Here is the actual code + data, vfree'd on unload. */ > void *module_core;
Cheers, Rusty.
| |