Re: [PATCH] Move some variables into the "most_readonly" section??

From: Andrew Morton
Date: Tue Jun 14 2005 - 18:28:14 EST


christoph <christoph@xxxxxxxxxxxx> wrote:
>
> On Wed, 8 Jun 2005, Andi Kleen wrote:
>
> > However this means __cacheline_aligned_mostly_readonly doesnt make much
> > sense since there is no need for alignment in read only. How about
> > replacing it with a __mostly_readonly that doesnt align and remove
> > __cacheline_aligned_mostly_readonly?
>
> Hmm. No.

Think so. If an object is in its own cacheline then it won't be pingponged
around by writes to unrelated nearby objects.

> The bigger cpu maps may benefit from cacheline alignment for
> even for read access.

A tiny bit, because the bitmaps might straddle one more cacheline than they
strictly need to.

> Here is a patch that introduces __mostly_readonly in
> addition to __cacheline_aligned_mostly_readonly:

I think readmostliness and alignment are mostly-unrelated concepts and
should have separate tag thingies. IOW,
__cacheline_aligned_mostly_readonly goes away and to handle things like the
cpu maps we do:

char foo[8] __cacheline_aligned _mostly_readonly = { whatever };


(I shall now go away and quietly tear my hair out. Those mostly-readonly
patches caused a mountain of grief:

optimise-storage-of-read-mostly-variables.patch
optimise-storage-of-read-mostly-variables-fix.patch
optimise-storage-of-read-mostly-variables-x86_64-fix.patch
optimise-storage-of-read-mostly-variables-x86_64-fix-fix.patch
optimise-storage-of-read-mostly-variables-x86_64-fix-fix-fix.patch
move-some-more-structures-into-mostly_readonly-and-readonly.patch
kexec-x86_64-optimise-storage-of-read-mostly-variables-x86_64-fix.patch

Once this is sorted I'll drop the lot and we start from a clean slate).
-
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/