Subject: mod/ref emulation in the pmap module
To: None <port-sh3@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-sh3
Date: 02/01/2001 12:58:26
Are we absolutely sure that modified/referenced emulation works
properly in the SH3 pmap module?

I'm booting my Dreamcast diskless right now (network kernel loader
on CD-R, loads the kernel via TCP, kernel mounts NFS root).  It
all works fine right up until /etc/rc.d/root runs.  That script
does a "umount -a", which causes vnodes to be flushed out, which,
unfortunately, is causing a page at offset 0 of a VTEXT vnode to
be flushed.  This, in turn, causes nfs_request() to fail an assertion;
the write creds for that vnode have never been set because the file
was never opened for writing.

The problem is that pmap_is_modified() is returning TRUE in uvn_flush(),
when it shouldn't.  The page (SHOULD BE) mapped read-only, and nfs_getpages()
claims to be calling pmap_clear_modify() once the page has been read from
the NFS server.

Now, one wouldn't generally notice this problem on a system running from
ramdisk or some other type of FFS, because the unmodified pages would
just be sync'd back, and no assertions would fail.

Has anyone else ever tried to run an SH3/SH4 system with an NFS root?

Has anyone ever really stressed the pmap module?

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>