Subject: Re: that VM/fs cache coherency problem
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Date: 08/02/1995 14:05:07
I just discovered something extremely interesting about this cache
coherency thing. I don't know what it means, but I suspect locking.
Briefly, ffs works, nullfs mounting ffs breaks.
The machine in question (this is now NetBSD/sparc, not NetBSD/sun3) has
mounts in place as follows:
/dev/sd0a on / type ufs (local)
/dev/sd0d on /usr type ufs (local)
/dev/sd0e on /sources type ufs (local)
/dev/sd0h on /local type ufs (local)
/sources/working-usr-src on /usr/src type null (local)
/var/dev on /wdev type null (local)
fdesc on /var/dev type fdesc (local, union)
procfs on /proc type procfs (local)
kernfs on /kern type kernfs (local)
If I do
# cd /usr/src
# rm -f zerrs
# sh -c 'while :; do echo foo; sleep 1; done' > zerrs &
# tail -f zerrs > /dev/null &
...wait a few...
# vi zerrs
then I see the bug: vi shows me a few lines of "foo" and a bunch of ^@s
(ie, NULs). Quitting and restarting vi shows me more ^@s.
But if the first line is "cd /sources/working-usr-src" instead,
everything works perfectly: vi shows me a bunch of "foo"s and no ^@s;
quitting and restarting shows more foos and still no ^@s.
I hope _someone_ knows what this means! Besides "don't use nullfs", I
mean, which I don't like, though I may fall back on making /usr/src a
symlink instead of a nullfs mount.