VM in v2.4.0test9

From: David Weinehall (tao@acc.umu.se)
Date: Wed Oct 04 2000 - 08:00:01 EST


Running the included program on a clean v2.4.0test9 kernel I can hang
the computer practically in no time. The only other runnning process
that can be of interest is dnetc. Running the same on a v2.2.xx kernel
will just depleat the memory then kill the offending process, leaving
everything nice and dandy.

What seems most strange is that the doesn't even get depleated.
The machine still answers to SysRq and ping, but nothing else.

This is on a 486slc2/50MHz with 16MB of memory. I'll perform tests on
other machines later.

This is what I got from SysRq+M (manual copy):

Free pages: 500 kB (0 highmem)
Active: 8 inactive dirty: 1009, inactive clean:0
free: 125 (31 62 93)
1x4 kB, 1x16 kB, 1x32 kB, 1x64 kB, 1x128 kB, 1x256 kB, 0x256 kB,
0x1024 kB, 0x2048 kB = 500 kB
Swap cache: add 203, delete 155, find 5/37
Free swap: 64772
4080 pages of ram
0 pages highmem
560 reserved
208 pages shared
48 pages swap cached
0 pagetable cache
Buffermem: 112 kB

I hope this can be of some help.

/David
  _ _
 // David Weinehall <tao@acc.umu.se> /> Northern lights wander \\
// Project MCA Linux hacker // Dance across the winter sky //
\> http://www.acc.umu.se/~tao/ </ Full colour fire </

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

char a[] = "\\|/-";
void main(int argc, char *argv[]) {
    char*ptr[4096];
    int b=0,i=0,j=0,k=0,p=1024;
    int ant=0,cnt, ant2=0, cnt2=0;
    
    ant2 = atoi(argv[1]);
    cnt2 = cnt = atoi(argv[2]);

    for (i=0;i<ant2;i++) {
        if ((ptr[i] = malloc(1024*1024))) {
            ant++;
        }
    }
    setbuf(stdout, NULL);
    printf("Starting with %d x %d MB:\n", cnt2, ant);
    printf("done %3d%% -", (int) ((float)cnt2-cnt)*100/cnt2);
    while (cnt-- > 0) {
        for(j=0;j<ant;j++) {
            printf("\b%c", a[b++%4]);
            memcpy(ptr[j],ptr[ant-j-1],1024*1024);
        }
        printf("\b\b\b\b\b\b%3d%% -",(int)((float)cnt2-cnt)*100/cnt2);
    }
    puts("\rWe are done.....");
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:13 EST