Re: [PATCH] Recent VM fiasco - fixed

Linus Torvalds
2000-05-12T00:09:48Z

On Thu, 11 May 2000, Simon Kirby wrote:
>
> Hrm! pre7 release seems to be even better. 113 vmstat-line-seconds now
> (yes, I know this isn't a very scientific testing method :)). Second try
> was 114 vmstat-line-seconds. classzone-27 did it in 107, so that's not
> very far off! Also, it swapped much less this time, and used less CPU.
> vmstat output attached.

The final pre7 did something that I'm not entirely excited about, but that
kind of makes sense at least from a CPU standpoint (as the SGI people have
repeated multiple times). What the real pre7 does is to just move any page
that has problems getting free'd to the head of the LRU list, so that we
won't try it immediately the next time. This way we don't test the same
pages over and over again when they are either shared, in the wrong zone,
or have dirty/locked buffers.

It means that the "LRU" is less LRU, but you could see it as a "how hard
do we want to free this" pressure-based system that really a least
recently _used_ system. And it avoids the "repeat the whole thing on the
same page" issue. And it looks like it behaves reasonably well, while
saving a lot of CPU.

Knock wood.

I'm still considering the pre7 as more a "ok, I tried to get rid of the
cruft" thing. Most of the special case code that has accumulated lately is
gone. We can start adding stuff back now, I'm happy that the basics are
reasonably clean.

I think Ingo already posted a very valid concern about high-memory
machines, and there are other issues we should look at. I just want to be
in a position where we can look at the code and say "we do X because Y",
rather than a collection of random tweaks that just happens to work.

Linus