Re: Inclusion of zoned inactive/free shortage patch

From: Linus Torvalds (torvalds@transmeta.com)
Date: Tue Jul 17 2001 - 22:56:19 EST


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/



This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:10 EST