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.
Eliminate a nasty race condition in vnode_pager_sync() by making
two passes. First, find all of the objects to be cleaned and reference
them. Second, traverse this list objects, cleaning them if there are
references other than us.
to describe here. This should fix the problems with "hanging processes"
people have seen since the original object collapse code was committed.
From Charles Hannum <mycroft@netbsd.org>
Create macros (with names borrowed from Mach 3) to manipulate
object->paging_in_progress, and use them. When decreasing the
paging count, always make sure to wake up anyone waiting.
Fixes `vospgc', `vosca1', and `vosca2' hangs.