consistent_free()

Paul Mackerras paulus at samba.org
Sat Jun 15 20:02:36 EST 2002


Dan Malek writes:

> > Interesting.  Using __get_free_pages guarantees that the pages are
> > physically contiguous.  Does the new ARM version do something clever
> > to get physically contiguous pages?
>
> The  __get_free_pages just does an alloc_pages().  The only difference
> is __get_free_pages returns the page address of the first page.  I
> think there was a previous version that used page structs to return
> unused pages so it was just more convenient to call alloc_pages() directly.
> In fact, I guess this is the current implementation.

So it still allocates 2^n pages for some n?  That makes sense to me.
Your original comment:

> The newer ARM version only allocates the number of pages necessary to
> cover the request.  The old version, and the one in PowerPC right now,
> would just use __get_free_pages, which was a power-of-two allocator.

implied to me that if you wanted 40kB it only allocated 10 pages, not
16, but in fact it sounds like the ARM implementation will actually
allocate 16 pages too.

Paul.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list