Skip to contentSkip to conversation

about hugetlbfs

LTP lina.zhao 1 participant 1 message Mar 30, 2010

lore
Share & tools
lore

lina.zhao

author
#0 lore raw

Hi all,

I have some problem about hugetlbfs test.

In hugeshmat01.c
the attach address for shmat is 0x90000eee .
But for mips32_Linux system ,the user pthread space is 0x00000000~0x7fffffff,
so 0x90000eee exceed the space ,the test will always failed on mips_32.

In hugemmap02.c
#define LOW_ADDR2 (void *)(0x90000000)
#define LOW_ADDR (void *)(0x80000000)
addr = mmap(LOW_ADDR, PAGE_SIZE, PROT_READ,

                            MAP_SHARED | MAP_FIXED, nfildes, 0);
addr2 = mmap(LOW_ADDR2, MAP_SIZE, PROT_READ | PROT_WRITE,
                            MAP_SHARED, fildes, 0);

/* 32-bit process */
if (addr2 > 0){
tst_resm(TCONF, "huge mmap() failed to test the

scenario");
                        continue;
                } else if (addr == 0) {
                        tst_resm(TPASS, "huge mmap() succeeded for 32-bit");
                } else {
                        tst_resm(TFAIL, "huge mmap() unexpectedly failed 
%s for 32-bit, errno=%d : %s",
                                TEMPFILE, errno, strerror(errno));
                }

the 0x90000000 and 0x80000000 also exceed mips32 user pthread space , so I changed them .
but add2 always return 717225984, no matter what I allocate to LOW_ADDR2. at last ,I changed LOW_ADDR2 to NULL, it also returned 717225984.

in the function ,why addr2> 0 then error happens? why addr should be 0? it is what exactly the LOW_ADDR assigns.

Thanks and Best Regards,
Lina

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list