tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mlockall() and small memory systems

In the regular sparc test runs on qemu the emulated sparc machine only
has 32MB of ram. In this setup the /usr/tests/lib/libc/sys/t_mincore test
"mincore_resid" fails. If we allow qemu ot provide more memory, the test

The part of the test that fails in "low" memory environments is:

An anonymous mmap of 128 pages size is created:

        addr = mmap(NULL, npgs * page, PROT_READ | PROT_WRITE,
            MAP_ANON | MAP_PRIVATE, -1, (off_t)0);

Nothing in this mapping is touched, so nothing gets paged in/modified.
Via mincore() the test now validates that 0 of the mapped pages are
resident. So far, this works.

Now a mlockall(MCL_CURRENT|MCL_FUTURE) call is done.

The test now expects all pages in the above mapping to be resident and
again checks via mincore().

This is the part where the test fails: some of the pages are not resident.

I do believe this is not a bug in the sparc pmap.

Am I wrong? Is this an MI bug? Or a bogus test?


Home | Main Index | Thread Index | Old Index