Instead of copulating with newfs to produce a new FFS image into
memory, mmap() a given existing image and pass that as the backing
store. If -s is given, mmap is done with MAP_SHARED and changes
are kept across mounts, else MAP_COPY (i.e. MAP_PRIVATE for us) is
done and changes are lost when the server exits.
Note: -s does not guarantee any kind of file system safety whatsoever
and in case of kill, crash, exit or other form of elusion,
everything will be, according to our theme, quite screwed.
mfs uses the mounting process for the backing store memory. I
guess mfs could be fixed to just reference the process vmspace and
let it return, but that would probably cause wait() to return for
other worms. So it's easier to dance according to mfs's tune: if
mounting mfs, create a thread for extra execution context.
with the also-experimental ioconf keyword. pseudo-root allows to
specify a root at any point in the device tree without having
attachments from the actual root.
For example, instead of having a config file like this:
mainbus0 at root
bus_a? at mainbus0
bus_b? at bus_a*
device7 at bus_b?
You can have one like this:
pseudo-root bus_b*
device7 at bus_b?
This will produce the relevant ioconf.c glue for device number 7
only instead of the whole 9 yards from root. Perhaps needless to
say, this can be used to generate snippets of config glue for
modules and, let's not deny that my main motivation for doing this,
rump components.
This is part 2/3 of my modifications to config (the last part is
autogenerating source file lists and component Makefiles).
No strong objection from cube (after a little pressuring ;), but
like he said, the implementation will most likely need some more
tweaking and may not work correctly under all pseudo-root uses yet.
- blast_dcache() becomes sp_blast_dcache(dcache_size, dcache_line_size)
- new smp_blast_dcache(sparc64_cpuset_t) that blasts the D$ on this cpuset
- sparc64_ipi_blast_dcache() to support the above
- in pmap_remove_all(), when freeing mmu contexts for this pmap, mark
the set of cpus to blast the d$ on as well and convert the
blast_dcache() call into smp_blast_dcache() on the cpus who ran this
pmap, or, sp_blast_dcache(dcache_size, dcache_line_size)
- convert the remaining blast_dcache() in machdep.c to sp_blast_dcache()
- in pmap_destroy()/pmap_remove_all() take the pmap_lock() always since
we assert it is held always.
with these changes, NFS builds on the U60 seem to be stable now, and
the USIII machines also can often complete a single build.sh run now,
diskful or diskless.
reviewed by mlelstv and partially by martin, tested by martin and myself,
with some ideas from chuq as well.