Re: superpages?
Re: superpages?
- Subject: Re: superpages?
- From: Stan Sieler <email@hidden>
- Date: Thu, 05 Nov 2015 11:47:35 -0800
- X_v_e_cd: 8d3654f1a12c3917e7b6c89964b43538
- X_v_r_cd: 0d81a24e5e3dad290928852adca8e341
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden