In message <m3fzuxq2k5.fsf@averell.firstfloor.org>, > : Andi Kleen writes:
> Gerrit Huizenga <gh@us.ibm.com> writes:
>
> > If the shared pte patch had mmap support, then all shared libraries
> > would benefit. Might need to align them to 4 MB boundaries for best
> > results, which would also be easy for libraries with unspecified
> > attach addresses (e.g. most shared libraries).
>
> But only if the shared libraries are a multiple of 2/4MB, otherwise you'll
> waste memory. Or do you propose to link multiple mmap'ed libraries together
> into the same page ?
Hmm. I didn't propose. Sounds cool. But that would have to happen
at the compiler's loader level, not the dynamic linker side of things,
which makes it less likely. Someone once proposed a mega-library where
the big/key shared objects were linked together which would make this
somewhat more practical.
But even wasting a bit of space for a few key libraries, even if they
are smaller than 4 MB (or 2 MB) on ia32 (ia32 PAE) might be worth a
bit of TLB & general overhead (e.g. like the kernel text pages). And,
if shared, even a bigger win.
> But I agree it would be nice to have a chattr for files that tells
> mmap() to use large pages for them.
Yep - that would be ideal - like the old sticky flag on binaries.
As a patch, that would make it easy to compare performance diffs as
well. Probably good for things like Oracle or DB2 as well.
gerrit
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:01:05 EST