Re: [PATCH] vmscan: skip freeing memory from zones with lots free

Rik van Riel
2008-11-29T22:07:40Z

Andrew Morton wrote:

> The bottom line here is that we don't fully understand the problem
> which 265b2b8cac1774f5f30c88e0ab8d0bcf794ef7b3 fixed, hence we cannot
> say whether this proposed change will reintroduce it.
>
> Why did it matter that "much more reclaim happens against highmem than
> against lowmem"? What were the observeable effects of this?

On a 1GB system, with 892MB lowmem and 128MB highmem, it could
lead to the page cache coming mostly from highmem. This in turn
would mean that lowmem could have hundreds of megabytes of unused
memory, while large files would not get cached in memory.

Baling out early and not putting any memory pressure on a zone
can lead to problems.

It is important that zones with easily freeable memory get some
extra memory freed, so more allocations go to that zone.

However, we also do not want to go overboard. Kicking potentially
useful data out of memory or causing unnecessary pageout IO is
harmful too.

By doing some amount of extra reclaim in zones with easily
freeable memory means more memory will get allocated from that
zone. Over time this equalizes pressure between zones.

The patch I sent in limits that extra reclaim (extra allocation
space) in easily freeable zones to 4 * zone->pages_high. That
gives the zone extra free space for alloc_pages, while limiting
unnecessary pageout IO and evicting of useful data.

I am pretty sure that we do understand the differences between
that 2004 patch and the code we have today.

--
All rights reversed.