[lkml]   [1998]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: patch cow-swapin [was Re: Very bad swap bug -- 2.0, 2.1 at least]
On Thu, 24 Sep 1998, Bill Hawes wrote:

>It may be that a simple change to the swap cache policy would help keep pages
>cached for situations like this. Currently pages are removed from the swap

Infact I did it now (the patch is on the fly).

>cache when the last in-memory use is retired, but instead we could test the
>swap_map use count and kept the page cached if there were multiple

In my patch unused swap cache pages are deleted only when the system needs
memory. I am getting very interesting interactive performance with my
patch applyed and the evil program in background (I have 64Mbyte of ram
and 50 of swap). The evil program is this:

#include <stdio.h>

#define BUFSIZE 10000000
volatile int buf[BUFSIZE];

volatile int i;
for (i=0; i<BUFSIZE; i++)
buf[i] = i;
for (i=0; i<BUFSIZE; i++)
buf[i] = i;
>references. Then it would be likely that a subsequent use would find the
>cached page and not need a swap-in.

In fact it' s running fine ;-).

Andrea[s] Arcangeli

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:44    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site