as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
write protection. this stops data corruption where it was possible
to change the in-memory copy of an append-only file (but not the on-disk
copy). this is documented in NetBSD security advisory 1998-003. thanks
to darrenr, lukem, cgd, mycroft and mrg for this.
the new proc structure when performing a fork. This makes it much
easier to abort a fork operation and return an error if we run out
of KVA space.
The U-area pages are still wired down in {,u}vm_fork(), as before.
calling vm_pager_get() doesn't count as a "majflt" unless the pager
returns VM_PAGER_OK. when walking an object chain we can get VM_PAGER_FAIL
(indicating that the requested data does not reside in this object
and we must continue to walk the chain) -- we don't want to count this
as a majflt.
i also added code to count ru_minflt.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.
these are the changes to the old Mach VM system to allow both to be
available in the kernel.
string. The actual functional changes are:
1. in vm_page_alloc(), restore some long lost code by Paul Kranenburg
that reserves the last few pages for kernel objects, adding an
additional escape for the pageout daemon.
2. In vm_wait() (replaces VM_WAIT), recognize the amusing fatal
deadlock where the pagedemon sleeps on a channel that only it ever
wakes up, and add a timeout and printf. Mod 1 should generally
prevent this from happening in any case.
3. Fix a livelock in vm_pageout_page() caused by a pre-wakeup of
page consumers prior to the pageout, which can easily fail over
memory issues in NFS and IP code. Also, ++ cnt.v_pageouts only
if the pageout succeeded.
legitimate for this to be set if vm_set_page_size() hasn't been called (it's
how the page size is communicated to vm_set_page_size()). Instead, test
for page_shift == 0; this is one of the values that vm_set_page_size()
initializes.
to vm_bootstrap_steal_memory(), since we may need to steal memory from
a direct-mapped segment at this early stage of the game (on e.g. MIPS
and Alpha).
This interface is activated by defining PMAP_STEAL_MEMORY in <machine/pmap.h>.
Otherwise, the pmap_virtual_space() prototype is in-scope for use by
vm_bootstrap_steal_memory().
called "MACHINE_NEW_NONCONGIG". this is required for UVM, the new VM
system (also written by chuck) that is coming soon. adds new functions:
vm_page_physload() -- tell the VM system about an area of memory.
vm_physseg_find() -- returns index in vm_physmem array that this
address is in.
and several new versions of old functions/macros defined in vm_page.h.
this is the MI portion. sparc, and then later i386 portions to come.
all other ports need to change to this ASAP! (alpha is already being
worked on)
and swapctl(). For the former three, they use an 'int' in their user-land
prototype which was a 'u_int' in the kernel, which screwed up automatic
generation/checking of lint syscall stubs. For the latter, the user-land
prototype uses a "const char *", but the syscall just used "char *".
From Chris Demetriou <cgd@pa.dec.com>.
to the stat(2) family and msync(2). This uses a primitive function
versioning scheme.
This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.
From Frank van der Linden <fvdl@NetBSD.ORG>.
by Chuck Cranor.
Use an exclusive (long-term) lock before applying changes to the swap
lists. This lock is also used by the stats system call because of possible
blocking in copyout().
Unlock the object cache before looking for collapse candidates.
Use vm_object_lock_try() to obtain a lock on a collapse candidate.
This avoids a deadlock due to recursively entering
vm_object_deallocate() in case a backing object goes away.
vm_object_collapse() and helper functions:
The object passed in is locked; make sure it is locked when
we leave vm_object_collapse().
XXX: Currently, the object is not unlocked during while we possibly
wait for pager data. We need to consider the effects of
simultaneous calls to vm_object_collapse() on the same object
in case unlocking is necessary.
architectures), truncate them intelligently instead.
The truncation is done centralized in vnode_pager.c.
This prevents from wrap-over effects when parts of large (>2^32 byte) files
are mmapped.
Don't allow to mmap above the numerical range of vm_offset_t.
This is considered a temporary solution until the vm system handles the
object sizes/offsets more cleanly.
object collapse (DONE), machine-dependent hook for virtual memory allocation
(DONE - PMAP_PREFER()), and better coherency between page and buffer
caches (A LITTLE BETTER - we sync up the vnode pager in the sync(2)
system call now).
- It was incorrect. A dev_t should _never_ be compared against
NULL, as 0 is a valid value (major 0, minor 0).
- The operator mave have _intentionally_ set dumpdev to "none"
(i.e. NODEV), and setting it the first time a VBLK swap device
is added would break the semantics.
setroot() deals with all dump device selection. Dumps and swap are now
in no way related.
__VM_PMAP_HACK is defined (for temporary compatibility).
The __VM_PMAP_HACK code should be removed after all the
ports that define it have removed all vm_pmap references.