Re: Inclusion of zoned inactive/free shortage patch

Linus Torvalds (torvalds@transmeta.com)
Tue, 17 Jul 2001 20:56:19 -0700 (PDT)


On Tue, 17 Jul 2001, Marcelo Tosatti wrote:
> >
> > Do you have any really compelling reasons for adding the zone parameter to
> > swap-out?
>
> Avoid the page-faults and unecessary swap space allocation.

In that case, what's the argument for not just replacing the zone
parameter with

/* If we have enough free pages in this zone, don't bother */
if (page->zone->nrpages > page->zone->high)
return;

which works without having a silly single-zone special case (think
multiple small zones, all under pressure, and one large zone that hasn't
seen pressure in ages).

A single-zone parameter just looks fundamentally broken. How do you
determine "which zone"? All allocations are really about zone _lists_, not
single zones.

This same test (maybe nicely abstraced with something like a
"page_zone_pressure(page)" inline function) makes sense in pretty much all
the scanning functions. We want to _age_ the pages in such zones, but we
may not actually want to do anything further.

Comments?

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/