On Fri, Nov 10, 2006 at 11:39:40AM -0800, Nishanth Aravamudan wrote:
> On 03.11.2006 [11:52:26 +1100], David Gibson wrote:
> > Here are a pair of patches adding extra testcases for some of the
> > kernel bugs recently found by Hugh Dickins.  These patches went to the
> > linux-mm list and some other people, but haven't made it to this list
> > yet, and appear to have dropped by the wayside.
> > 
> > As extra testcase patches, these should both be low risk.
> 
> Ok, I've noticed a problem with truncate_sigbus_versus_oom. On a G5
> running 2.6.19-rc5, with 200 hugepages allocated, I get:
> 
> truncate_sigbus_versus_oom 200 (32):    FAIL    mmap() reserving all pages
> truncate_sigbus_versus_oom 200 (64):    ./run_tests.sh: line 30:  8482 
> Segmentation fault      PATH="obj$BITS:$PATH" 
> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../obj$BITS" $ENV "$@"
> 
> But with only 100 hugepages allocated, I get:
> 
> truncate_sigbus_versus_oom 100 (32):    PASS
> truncate_sigbus_versus_oom 100 (64):    PASS

Ah, yes.  In fact there are several testcases with this problem.  The
32-bit version fails because it attempts to consume all available
hugepages, but runs out of address space first.

> Beyond the known truncate_above_4G issues, these are the only tests that
> fail on the G5 with 200 hugepages allocated. Should we constrain the
> maximum parameter sent to this test?

No.  If we constrain the parameter, we won't get the oom condition
that these tests require.  What we need to do is to consume all the
pages without using all the address space.  With a shared mapping
that's pretty easy: just map block of pages that will fit in the 32
bit address space, then unmap them (they won't be discarded because
they're in the persistent hugetlbfs file), then map the next block
from an offset higher than the first block and so forth until all the
pages are consumed.

I've been meaning to implement this, but have been chasing more
important bugs.  Feel free to go for it...

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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to