On Thu, Sep 16, 2010 at 04:14:59PM +0400, Max Lapan wrote:
> Hi all!
> 
> Thanks for great library.
> 
> I have a application which stands as a simple wrapper, forwarding
> requests into shared library. This library is very heavy and generates
> lots of TLB misses. Is there any way to remap this library into
> hugepages? I tried to LD_PRELOAD libhugepages without success (it
> remaps only application) and linkage of .so agains libhugetlbfs.so.
> Without success either, it says:
> 
> libhugetlbfs [searcher30.p:5711]: Couldn't locate __executable_start,
> not attempting to remap segments
> 
> Is there any way to remap given shared library (or, maybe whole
> application with all libraries recursively)?

I'm afraid not.  Because of the way the dynamic linker works, this is
actually quite a lot more difficult than remapping the main executable
segments.

> Or this is not possible
> and I must combine both wrapper and so into one binary?

For the forseeable future, yes.  However, you shouldn't need to make
actual code changes for this - if you statically link your library
into the application (but dynamically link the system libraries), then
setting libhugetlbfs to remap the application segments should cover
your library code as well.

Also, what portion of the library is generation the TLB misses?  Is it
on the actual code, or on compiled-in data, or is it on scratch data
in the library's BSS?  If it's the last, maybe you could change the
library to dynamically allocate space instead of using BSS; then the
libhugetlbfs MORECORE option would move the library's allocations to
hugepage as well as the main executable's.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to