Re: [patch] arca-vm-6, killed kswapd [Re: [patch] new-vm improvement , [Re: 2.2.0 Bug summary]]

Zlatko Calusic
1999-01-05T13:26:21Z

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Andrea Arcangeli <andrea@e-mind.com> writes:

> On 5 Jan 1999, Zlatko Calusic wrote:
>
> > At this point (output of Alt-SysRq-M), machine locked:
>
> Are you been able to continue using SysRq-K?

Erm... I continued with *&#&%$ Alt-SysRq-{S,U,B}.
That worked for me. :)

>
> Could you reproduce and press ALT-right+Scroll-Lock and tell me what the
> kernel was executing at that time...
>

I tried few times, but to no avail. Looks like subtle race, bad news
for you, unfortunately.

*BUT*, after I pressed ctrl-c against mmap-sync in one of the torture
tests, the program stuck in down_failed (loadav += 2). Few minutes
later machine got very unstable and I decided to reboot it. Go figure.

> Could you send me also the proggy for the shared-mmaps to allow me to
> reproduce?
>

Sure, just be careful. :)

[-- Attachment #2: Exercise shared mappings --]
[-- Type: application/octet-stream, Size: 1009 bytes --]

#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>

/*
* file size, should be half of the size of the physical memory
*/
#define FILESIZE (32 * 1024 * 1024)

int main(void)
{
char *ptr;
int fd, i;
char c = 'A';
pid_t pid;

if ((fd = open("foo", O_RDWR | O_CREAT | O_TRUNC)) == -1) {
perror("open");
exit(1);
}
lseek(fd, FILESIZE - 1, SEEK_SET);
/* write one byte to extend the file */
write(fd, &fd, 1);

/* get a shared mapping */
ptr = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (ptr == NULL) {
perror("mmap");
exit(1);
}

/* touch all pages in the mapping */
for (i = 0; i < FILESIZE; i += 4096)
ptr[i] = c;

while (1) {
if ((pid = fork())) { /* parent, wait */
waitpid(pid, NULL, 0);
} else { /* child, exec away */
#if 0
execl("/bin/echo", "echo", "blah");
#else
fsync(fd);
printf("blah\n");
exit(0);
#endif
}
sleep(5);
}
}

[-- Attachment #3: Type: text/plain, Size: 84 bytes --]

P.S. Apologies for too many jokes, I didn't sleep at all last night. ;)
--
Zlatko