Re: Page allocator: Single Zone optimizations

Christoph Lameter
2006-11-03T18:15:02Z

On Fri, 3 Nov 2006, Peter Zijlstra wrote:

> > I think talking about reclaim here is not what you want.
>
> I think it is; all of this only matters at the moment you want to
> allocate a large page, at that time you need to reclaim memory to
> satisfy the request. (There is some hysteresis between alloc and
> reclaim; but lets ignore that for a moment.)

That is wrong. Dropping pages that will later have to be reread is not
good. It is better to defrag by moving pages.

> So, the basic operation is reclaim, make it succeed in freeing up the
> requested order page (with the least possible disturbance to the rest).

It may lead to rereading of the page.

> Moving memory about is not the point; although it might come in handy;
> its freeing linear chunks of memory without disturbing too much.

Freeing pages that we have to reread?

> Sure, defrag or rather move_pages() could be rather useful.

We have migrate_pages() for exactly that purpose.

> The ability to move pages about that are otherwise unreclaimable does
> indeed open up a new class of pages. But moving pages about is not the
> main purpose; attaining linear free pages with the least amount of
> collateral damage is.

IMHO Moving pages creates less collateral damage than evicting
random pages.