Re: Page allocator: Single Zone optimizations

Peter Zijlstra
2006-11-03T18:53:03Z

On Fri, 2006-11-03 at 10:15 -0800, Christoph Lameter wrote:
> 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.

> > 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.

Move them where?, you have to drop pages anyway, the only thing
migrate_pages() (my bad for calling it move_pages()) might help with is
preserving LRU order better and the possibility to move otherwise
unreclaimable pages to a more favourable position (page-tables,
mlock'ed).