lkml.org 
[lkml]   [2015]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 10/10] module: Rework module_addr_{min,max}

* Peter Zijlstra <peterz@infradead.org> wrote:

> On Mon, Apr 13, 2015 at 06:56:36PM +0200, Ingo Molnar wrote:
> > > + * Bounds of module allocation, for speeding up __module_address.
> > > + * Protected by module_mutex.
> > > + */
> > > +static unsigned long module_addr_min = -1UL, module_addr_max = 0;
> >
> > I suspect the same .data vs. .bss problem affects the #else branch as
> > well?
>
> Yes, but the linear walk already has a 'problem', other than the linear
> walk itself being one, the list_head isn't actually on the same line as
> the 'key' entries -- although I suppose I could fix that for the
> !CONFIG_MODULES_TREE_LOOKUP case.
>
> > If so then it would make sense IMHO to put the structure definition
> > into generic code so that both variants benefit from the shared
> > cacheline?
>
> Isn't this optimizing hopeless code? I mean, I can make the change;
> something like the below. Although I suppose we should use
> ____cacheline_aligned here and just take the false sharing.

Well, I think the point is to share more code and move the two
variants closer to each other without hurting either side - not to
optimize the slower side necessarily.

But I have no strong opinions either way!

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-04-14 15:41    [W:0.079 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site