Re: [PATCH] free_memory_available() fix

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Tue, 3 Mar 1998 03:02:39 +0100 (MET)


On Tue, 3 Mar 1998, David Burrows wrote:
> On Tue, 3 Mar 1998, Rik van Riel wrote:
> > Here's the patch to free_memory_available() in mm/page_alloc.c.
>
> I've patched pre5, and I'm witnessing a rather startling performance
> increase.. I have 32mb ram, on my p133 running a pretty stock RH5 with
> glibc 2.06.. Anyway, I have a 16mb swap partition, and I noticed that when
> all the swap gets eaten up (eg 0 free swap) the system returns to its disk
> chomping process blocking state.. :) I was disappointed, so I created a

That's because, when swap space is exhausted, Linux can't
make good use of the don't-swap-if-clean-and-already-swapped
strategy anymore.

When you've got plenty of swap space, and a clean page is
to be swapped out, it can be just forgotten about when it's
already written to swap. When however that clean page was
just purged from swap to accomodate another program, it will
have to be rewritten, thereby doubling the amount of disk
I/O needed :-(

Just make sure you have enough swap, and performance
should rock...

Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ). | H.H.vanRiel@fys.ruu.nl |
| ...submissions welcome... | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu