On 16.10.2006 [13:12:44 +1000], David Gibson wrote: > On Fri, Oct 13, 2006 at 12:45:44PM -0700, Nishanth Aravamudan wrote: > > On 11.10.2006 [13:53:18 +1000], David Gibson wrote: > > > A couple of questions about the mlock testcase added in commit > > > ff2f5343e4a4e2d2e62173d557a7e5952cfa7733. > > > > > > First, is there a rationale for mlock()ing all the available hugepages > > > (as passed in on the command line). I don't see an obvious reason > > > that that's a useful thing to test (as opposed to just mlock()ing a > > > sample page), and it makes the testcase run quite slowly. I'd like to > > > keep the "functional" (rather than "stress") portion of the testsuite > > > nice and fast, making for quicker cycle time when tracking down > > > regressions. > > > > > > Second, the testcase maps the file both normally and with MAP_LOCKED, > > > which ought to lock the file as with mlock() at mmap() time. It also > > > explicitly mlock()s the file, but only when mapped with MAP_LOCKED > > > which seems backwards. Surely we should be checking mlock() when the > > > file was not originally locked. Is this really the intended > > > behaviour. > > > > Your concerns seem pretty valid, David. > > > > Patches are welcome :) > > Here you go, then: > > Simplify and speed up the mlock testcase. > > At present the mlock test case attempts to mlock() all available > hugepages (as passed in on the command line). This isn't particularly > more useful than just testing locking a single page. This patch > reduces it to testing just a single page (with each set of mapping > options). > > In addition, we were only testing actual mlock() calls on files opened > with MAP_LOCKED, which are supposed to be mlock()ed anyway, rather an > oversight. This patch corrects this also. > > What would be another useful test is to verify that mlock()ing really > does reserve the page in question, i.e. that a page mlock()ed but not > touched will always instantiate without fault later, even if all other > hugepages on the system have been consumed. That's another patch for > another day. > > Signed-off-by: David Gibson <[EMAIL PROTECTED]>
Acked-by: Nishanth Aravamudan <[EMAIL PROTECTED]> -- Nishanth Aravamudan <[EMAIL PROTECTED]> IBM Linux Technology Center ------------------------------------------------------------------------- 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