Re: [PATCH]mmap: add alignment for some variables
From: Christoph Lameter
Date: Tue Mar 29 2011 - 18:38:21 EST
On Tue, 29 Mar 2011, Andrew Morton wrote:
> > -struct percpu_counter vm_committed_as;
> > +struct percpu_counter vm_committed_as ____cacheline_internodealigned_in_smp;
>
> Why ____cacheline_internodealigned_in_smp? That's pretty aggressive.
>
> afacit the main benefit from this will occur if the read-only
> vm_committed_as.counters lands in the same cacheline as some
> write-frequently storage.
>
> But that's a complete mad guess and I'd prefer not to have to guess.
It would be useful to have some functionality that allows us to give
hints as to which variables are accessed together and therefore would be
useful to put in the same cacheline. Thus avoiding things like the
readmostly segment and the above aberration.
Andi had a special pda area in earlier version before the merger of 32 and
64 bit code for x86 that resulted in placement of the most performance
critical variables near one another. I am afraid now they are all spread
out.
So maybe something that allows us to define multiple pdas? Or just structs
that are cacheline aligned?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/