Subject: Re: Observations on our VM system problem
To: None <ghudson@MIT.EDU>
From: Frank van der Linden <frank@fwi.uva.nl>
List: tech-kern
Date: 03/01/1996 16:31:23
Quoting ghudson@MIT.EDU,

> I wrote a test program to illustrate the canonical NetBSD VM system
> problem (vnode-backed VM pages can get out of sync with the filesystem
> and stay that way indefinitely).  I've inclueded the test program at
> the end of this message.  It should print "Hello.\nThere.\n" if it
> works properly; it actually prints "Hello.\n\0\0\0\0\0\0\0".  Notice
> that an msync() after the second mmap() does not avert the problem (so
> the patch I recently sent to the guy on netbsd-help is useless).
[...]
>     addr_hold = mmap(NULL, 7, PROT_READ, 0, fd_hold, 0);
[...]
>     addr = mmap(NULL, 14, PROT_READ, 0, fd, 0);

Seems to me that you need to specify MAP_SHARED in the mmap() calls..

- Frank