Hi, I've been poking around at the libhugetlbfs testcases and there are a small number of failures that I can't figure out. The primary one is the malloc test. From all appearances, it seems that the custom hugetlbfs_morecore function isn't getting called when the test calls malloc, and it fails because the page wasn't allocated from the hugepages. You can see below that the INFO call in the hugetlbfs_morecore function never prints anything:
[jwboyer@zod obj64]$ sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:../../obj64/ LD_PRELOAD=../../obj64/libhugetlbfs.so HUGETLB_MORECORE=yes HUGETLB_VERBOSE=4 ./malloc libhugetlbfs [zod.bos.redhat.com:22061]: INFO: Found pagesize 2048 kB libhugetlbfs [zod.bos.redhat.com:22061]: INFO: Parsed kernel version: [3] . [3] . [7] libhugetlbfs [zod.bos.redhat.com:22061]: INFO: Feature private_reservations is present in this kernel libhugetlbfs [zod.bos.redhat.com:22061]: INFO: Feature noreserve_safe is present in this kernel libhugetlbfs [zod.bos.redhat.com:22061]: INFO: Feature map_hugetlb is present in this kernel libhugetlbfs [zod.bos.redhat.com:22061]: INFO: Kernel has MAP_PRIVATE reservations. Disabling heap prefaulting. libhugetlbfs [zod.bos.redhat.com:22061]: INFO: Kernel supports MAP_HUGETLB libhugetlbfs [zod.bos.redhat.com:22061]: INFO: HUGETLB_SHARE=0, sharing disabled libhugetlbfs [zod.bos.redhat.com:22061]: INFO: HUGETLB_NO_RESERVE=no, reservations enabled libhugetlbfs [zod.bos.redhat.com:22061]: INFO: No segments were appropriate for remapping libhugetlbfs [zod.bos.redhat.com:22061]: INFO: setup_morecore(): heapaddr = 0xe00000 Starting testcase "./malloc", pid 22061 HUGETLB_MORECORE=yes HUGETLB_RESTRICT_EXE=(null) expect_hugepage=1 malloc(4) = 0xd89010 FAIL Address is not hugepage [jwboyer@zod obj64]$ This is with the latest git head of libhugetlbfs, and I have 32 hugepages setup and free: [jwboyer@zod glibc]$ grep Huge /proc/meminfo AnonHugePages: 299008 kB HugePages_Total: 32 HugePages_Free: 32 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB [jwboyer@zod glibc]$ I ran the test in gdb as well, and my breakpoint on hugetlbfs_morecore never triggered after main was started. Perhaps this is a side-effect of glibc already having pre-allocated heap from arenas? Has anyone else seen this? josh ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel