On Thu, Jun 25, 2009 at 03:50:14AM +0000, David Brown wrote:
> I've been playing around with large pages and libhugetlbfs and have
> been having no such luck getting my code segment to be backed by large
> pages.
> 
> I have a small example code that doesn't seem to be loading.

First, does the libhugetlbfs pass ("make check").

[snip]
> $ hugectl -v -v --text --bss --heap --shm --data ./test 10000000
> hugectl: INFO: HUGETLB_VERBOSE='4'
> hugectl: INFO: LD_LIBRARY_PATH='/usr/local/lib:/usr/local/lib64:'
> hugectl: INFO: HUGETLB_ELFMAP='R:W'
> hugectl: INFO: HUGETLB_MORECORE='yes'
> hugectl: INFO: HUGETLB_SHM='yes'
> hugectl: WARNING: LD_PRELOAD not appropriate for this map combination
> libhugetlbfs [uber-gamer:31047]: INFO: Parsed kernel version: [2] . [6] . [30]
> libhugetlbfs [uber-gamer:31047]: INFO: Feature private_reservations is
> present in this kernel
> libhugetlbfs [uber-gamer:31047]: INFO: Kernel has MAP_PRIVATE
> reservations.  Disabling heap prefaulting.
> libhugetlbfs [uber-gamer:31047]: INFO: HUGETLB_SHARE=0, sharing disabled
> libhugetlbfs [uber-gamer:31047]: INFO: Segment 0 (phdr 2):
> 0x400000-0x40089c  (filesz=0x89c) (prot = 0x5)
> libhugetlbfs [uber-gamer:31047]: INFO: Segment 1 (phdr 3):
> 0x8008a0-0x40800ae0  (filesz=0x220) (prot = 0x3)
> libhugetlbfs [uber-gamer:31047]: INFO: libhugetlbfs version: 2.4
> libhugetlbfs [uber-gamer:31048]: INFO: Mapped hugeseg at
> 0x2aaaaac00000. Copying 0x89c bytes and 0 extra bytes from
> 0x400000...done
> libhugetlbfs [uber-gamer:31047]: INFO: Prepare succeeded
> libhugetlbfs [uber-gamer:31049]: WARNING: Unable to verify address
> range 0x800000 - 0x800000.  Not empty?
> libhugetlbfs [uber-gamer:31049]: INFO: Mapped hugeseg at
> 0x2aaaaac00000. Copying 0x220 bytes and 0 extra bytes from
> 0x8008a0...done
> libhugetlbfs [uber-gamer:31047]: INFO: Prepare succeeded
> Failed to map hugepage segment 1: 800000-40a00000 (errno=12)
> Aborted

errno 12 is ENOMEM.  This suggests you don't have enough hugepages
allocated to back the program's segments.

-- 
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

------------------------------------------------------------------------------
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to