lkml.org 
[lkml]   [1998]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.1.90 dies with many procs procs, partial fix

I haven't got to the bottom of this yet, but if you compile
2.1.90 with the following files from 2.1.89, the kernel works
somewhat better:

linux/fs/buffer.c
linux/include/linux/swap.h
linux/include/linux/swapctl.h
linux/kernel/sysctl.c
linux/mm/page_alloc.c
linux/mm/slab.c
linux/mm/swap.c
linux/mm/vmscan.c


The following test program will show the problem with 2.1.90:
(The problem only occurs if you have too little memory to keep all the
procs in memory, so try booting with mem=20M or less)

#include <sys/types.h>
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>

int main() {
int procs = 0;
while (1) {
int err = fork();
if (err == -1) {
perror("fork failed. eek.");
exit(EXIT_FAILURE);
} else if (err == 0) {
setsid();
pause();
_exit(EXIT_SUCCESS);
}
++procs;
printf("%d children forked off\n", procs);
usleep(30000);
}
exit(EXIT_SUCCESS);
}

It will pretty soon print warnings like these:

swap_duplicate: entry 00001b00 map count=126
swap_duplicate: entry 00001c00 map count=126
swap_duplicate: entry 00001d00 map count=126
swap_duplicate: entry 00001e00 map count=126
swap_duplicate: entry 00001b00 map count=127

- Finn Arne


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

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.019 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site