The functionality is not for general purpose use. Super pages requires that the backing 2MB be physically contiguous. After a system has been up for a while, wired pages may fragment physical memory and prevent 2MB of physically contiguous pages from being found. Try running the test program after a reboot to verify if this is the case. Shantonu
On Nov 4, 2015, at 6:17 PM, Nathan Hjelm <hjelmn@mac.com> wrote:
Are superpages still supported in OS X. I tried to run the test in xnu (http://www.opensource.apple.com/source/xnu/xnu-2782.40.9/tools/tests/superpa...) but it fails pretty much every test:
➜ /tmp ./testsp Running 14 tests: Test #1 "allocate one page anywhere"...FAILED! (mach_vm_allocate() returned 3) Test #2 "deallocate a page"...FAILED! (skipped deallocation) Test #3 "allocate a SIZE_ANY page anywhere"...FAILED! (mach_vm_allocate() returned 3) Test #4 "allocate one page at a fixed address"...FAILED! (mach_vm_allocate() returned 3) Test #5 "allocate one page at an unaligned fixed address"...OK Test #6 "deallocate sub-page"...FAILED! (mach_vm_allocate() returned 3) Test #7 "allocate already allocated subpage"...FAILED! (mach_vm_allocate() returned 3) Test #8 "wire a page"...FAILED! (mach_vm_allocate() returned 3) Test #9 "unwire a page"...FAILED! (mach_vm_allocate() returned 3) Test #10 "make page readonly"...FAILED! (mach_vm_allocate() returned 3) Test #11 "make sub-page readonly"...FAILED! (mach_vm_allocate() returned 3) Test #12 "file I/O"...FAILED! (mach_vm_allocate (1)() returned 3) Test #13 "mmap()"...FAILED! (mmap()) Test #14 "fork"...FAILED! (mach_vm_allocate() returned 3)
Ran this on 10.11.1. Haven’t had a chance to try other OS X versions.
-Nathan Hjelm _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/ssen%40apple.com
This email sent to ssen@apple.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Shantonu Sen