Re: [RFC] memory page alloc minor cleanups

Paul Jackson
2006-10-10T01:45:02Z

pj wrote:
> The check is not needed right there. If we have an empty zonelist, then
> that just makes the zonelist scanning go all the faster ;). Harmless,
> silly, but rare.

I should read the code before spouting off ... ;).

The get_page_from_freelist() code assumes in many places that there
is at least one zone in the zonelist. It will barf all over the
place if zonelist->zones[0] is not a valid pointer.

Either this check for an empty zonelist at the top of __alloc_pages()
stays, or it becomes some kind of BUG() or someone more confident than
I removes it.

I'll be sending a patch to restore that check for an empty zonelist,
shortly.