lkml.org 
[lkml]   [2015]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCH] module: Optimize __module_address() using a latched RB-tree
Date
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.


\
 
 \ /
  Last update: 2015-02-27 13:21    [W:0.141 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site