Re: [Fwd: Page allocator doubt]

Dave Hansen
2004-11-11T19:36:59Z

On Thu, 2004-11-11 at 11:27, Luciano A. Stertz wrote:
> But... are they allocated to me, even with page_count zeroed? Do I need
> to do get_page on the them? Sorry if it's a too lame question, but I
> still didn't understand and found no place to read about this.

Do you see anywhere in the page allocator where it does a loop like
yours?

for (i = 1; i< 1<<order; i++)
get_page(page + i);

When you do a multi-order allocation, the first page represents the
whole group and they're treated as a whole. As you've noticed, breaking
them up requires a little work.

Why don't you post all of the code that you're using so that we can tell
what you're doing? There might be a better way. Drivers probably
shouldn't be putting stuff in the page cache all by themselves.

-- Dave