[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
__get_free_pages() internal
Just a newbie question: __get_free_pages() - how does it worked?
It is really just my guess - attempted tracing really did not answer
all the following question - as it was just too deep....
first, it should attempt to allocate space from physical mem...and it
uses max_pfn as the mark to guide it.
correct? question: multiple processor may be attempting to allocate
/ call __get_free_pages() at the same time - and uses max_pfn as the
guide on the maximum available physical frames. so how is the
coordination done? (if it is a lock, what is the name of the global
lock?)
On the other hand, because i cannot find the link between max_pfn and
__get_free_pages() - so question is how does __get_free_pages() know
where the max pfn it can used for memory allocation?
next, it should then update the pagetable entries - right? PAE and
non-PAE will have different path. correct? roughly where are these
done in kernel?
essentially...it should be marking the pagetable entries for the block
of memory as "notfree" - right? what is the function used? thanks.
--
Regards,
Peter Teoh
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ