Re:
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.
Hmm…would be interesting to have a utility that would display a map of physical memory, indicating the wired pages and who owns them. I’d have fun with that! Sounds like OS X needs the same enhancement request I made for MPE/iX some years back, although hopefully with a different result (MPE/iX (and the HP 3000) were killed after I made my request, but I’m sure cause and effect :)) Enhancement: When code requests wired / permanent memory, the OS will strive to make wired memory contiguous with existing wired memory, to avoid fragmenting physical memory. One possible approach could be: 1. find the address just after the last satisfied wired request; 2. find the address of the first non-wired address area that would work. if #2 is lower than #1, #2 is used. (this could happen if a prior wired chunk was released) (If #2 + length extends past prior #1, remember it as new #1, of course) else sufficient memory is kicked out starting at #1, then #1 is used, and the end address is recorded for future use in #1. (Apologies for any OS X terminology misuse … I work on too many OSes!) (I had needed to get 3 pages of contiguous physical space (wired) allocated on MPE/iX (probably the only person outside of of HP to want to do this), and the space had to be in the first 4 GB of physical space … turns out the OS couldn’t reliably do it after the system had been up for awhile :) thanks, Stan Sieler _______________________________________________ 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)
-
Stan Sieler