Re: superpages?
Re: superpages?
- Subject: Re: superpages?
- From: Shantonu Sen <email@hidden>
- Date: Wed, 04 Nov 2015 22:25:04 -0800
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 <email@hidden> 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/superpages/testsp.c) 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 (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >superpages? (From: Nathan Hjelm <email@hidden>) |