Re: 2.1.98 broken?

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Tue, 10 Mar 1998 10:13:57 +0100 (MET)


On Tue, 10 Mar 1998, Marcus Berglund wrote:

> >Yeah, I've noticed that everything seems to completetly stop when it's
> >swapping, interactive performance is worse when swapping it seems.
> > -Myrdraal
>
> Here, it seems to want to do alot of buffering, and on my SCSI-1 1Gb
> drive, which is slow, I run out of memory, and the computer comes to a
> near halt, this happens on a read or write too/from that particular drive,
> 2.1.88 never done this.

There have been two changes in 2.1.89 that are responsible
for the extra buffer memory and the swapping frenzy.

The buffer memory isn't neccesarily evil, but combined
with the other one it can give some strange effects...

The 'evil' part is free_memory_available(), which tells
kswapd not to stop until there's at least one free 128kb
area (look in mm/page_alloc.c). When this is used in
combination with buffer memory aging, it can lead to
some swapping frenzy (since pages are freed in a more
random way, making it less likely for large free areas
to emerge).

A quick fix is attached...

(Until Stephen and Ben have finished their VM overhaul,
there isn't much else we can do)

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/ |
+-----------------------------+------------------------------+

--- vmscan.c~ Mon Mar 9 20:51:44 1998
+++ vmscan.c Mon Mar 9 20:51:44 1998
@@ -573,6 +573,8 @@

if (free_memory_available())
break;
+ if (nr_free_pages + atomic_read(&nr_async_pages) > free_pages_high * 4)
+ break;
gfp_mask = __GFP_IO;
try_to_free_page(gfp_mask);
/*

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