Re: [PATCH] vm-fix-all_zones_ok (was Re: 2.6.3-mm3)

From: Andrew Morton
Date: Tue Feb 24 2004 - 17:41:52 EST


Rik van Riel <riel@xxxxxxxxxx> wrote:
>
> On Tue, 24 Feb 2004, Andrew Morton wrote:
> > Chris Wedgwood <cw@xxxxxxxx> wrote:
> > > On Tue, Feb 24, 2004 at 03:11:40PM +1100, Nick Piggin wrote:
> > >
> > > > Out of interest, what is the worst you can make it do with
> > > > contrived cases?
> > >
> > > 700MB slab used.
> >
> > Sigh. There is absolutely nothing wrong with having a large slab cache.
> > And there is nothing necessarily right about having a small one.
>
> Could it be that the lower zone protection stuff simply means
> that Chris's system only ever allocates page cache and anonymous
> memory from his 600 MB highmem, leaving the 900 MB lowmem for
> the slab cache to roam freely ?

The lower-zone protection code will only preserve an extra megabyte or so
of the normal zone in response to __GFP_HIGHMEM allocations, so it won't be
coming into play here.

I'd prefer to replace the lower-zone/incremental-min code with 2.4's
watermark code. It's pretty much equivalent, but makes the calculations
once-only and it is easier to observe and understand its effects. But
there's too much work going on in there to make this change at present.


> I guess highmem allocations really should put some pressure on
> lowmem, even when there is enough lowmem free, because otherwise
> you end up effectively not using half of the memory on 1.5-2 GB
> systems for paging ...

Yup. With the current -mm patches the reclaim rate from lowmem and highmem
is nicely proportional to each zone's size for pagecache-heavy workloads.
For lowmem-intensive workloads the reclaim rate from lowmem is higher, as
one would expect. It seems to be working OK now.

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