Re: [RFC 2/4] Have __free_pages_memory() free in larger chunks.

Yinghai Lu
2013-07-13T03:08:56Z

On Fri, Jul 12, 2013 at 12:45 AM, Robin Holt <holt@sgi.com> wrote:

> At the very least, I think we could change to:
> static void __init __free_pages_memory(unsigned long start, unsigned long end)
> {
> int order;
>
> while (start < end) {
> order = ffs(start);
>
> while (start + (1UL << order) > end)
> order--;
>
> __free_pages_bootmem(start, order);
>
> start += (1UL << order);
> }
> }

should work, but need to make sure order < MAX_ORDER.

Yinghai