This is a list of the changes to the vm system as of 14 Jan 94:
authorDavid Greenman <davidg@Root.COM>
Fri, 14 Jan 1994 16:27:33 +0000 (16:27 +0000)
committerDavid Greenman <davidg@Root.COM>
Fri, 14 Jan 1994 16:27:33 +0000 (16:27 +0000)
commit557681786c61267d84b3232c84827a96d77cceac
treeae860cd4c3ba5d065cea36285cc8ee58ae2fd05e
parent1d7f5b47893dbbf007db94a860de29fea54e12f5
This is a list of the changes to the vm system as of 14 Jan 94:

1) Upages are now in process address space.  They can be paged out when
the process is swapped out.  The majority of changes are in
vm_glue.c and pmap.c.  Upages are always recorded to be modified.

2) Page table pages are not high level vm wired except to insert pages
pte's into the pmap.  The pmap subsystem has a wiring mechanism of
its own now, and releases page table pages to the vm system when the
number of pages pointed to by the page table page drops to zero.
This mechanism allows the physical memory for process page tables
to be reclaimed for use by other processes during memory shortages.
The majority of changes are in trap.c, pmap.c, kern__physio.c,
procfs_subr.c.  Page table pages are never recorded to be modified.

3) Page table pages are faulted in by referring to the page table page
from kernel address space.  Temporary wiring of the page table page
is performed by removing the page from the inactive and active
queues.  This is much more efficient than many other techniques
(explicit vm_fault's.)

4) Pmap.c has major sections rewritten for efficiency.  String operations
are used when possible.  Also, pmap_remove (called often) has
been rewritten to be *much* more efficient.

5) Pmap_attributes has been removed.  The side effect of storing the
modified and used (referenced) bits is difficult to control.  Mods
have been made to the rest of the vm system to not assume carryover
of the modified bits.  It is believed that this fixes a problem
where pages were often written to the backing store unnecessarily.

6) Pageout queue management is *much* more efficient:

6a) Pages that are deactivated are removed from pmaps.  This allows the
system to fault immediately when a page is used again.  Thereby
providing LRU heuristics used in [6b].

6b) The active page queue is logically segmented into slices, and a
page has to be scanned as unused for multiple passes to be deactivated.
Pages that are used are placed immediately at the end of the active
queue, thereby deferring deactivation for a "long time".

6c) A limited form of biasing page inactivation towards processes exceeding
RSS limits has been included.  Hooks have been added to support hard
RSS limits that may be added in the future.

7) Vm_fault now supports pagers that can do multiple block input.  The
logic makes sure that the readahead/behind falls in the same object
and pager (used in [8] and [9].)  Readaheads/behinds are inhibited
under very low memory conditions.  It is left to the pager to decide
whether to actually perform the readahead/behind.

8) The swap_pager supports contiguous block allocations and multi-block
input can be peformed.

9) The vnode_pager bypasses the buffer-caching mechanism, thereby
conserving buffer cache and eliminating page memory copies under
most circumstances.  Also, the vnode_pager supports contiguous
readaheads/behinds.

10) The vm_object_collapse code has be improved significantly, and the
swap_pager allocations have been modified to support the improved
operation.  (This improves the swap space allocation problem.)
Under rare circumstances it is still possible to run into the
VM swap space deallocation problems related to the object
paging_in_progress flag, but a fix is in the works ( and is
relatively simple, but tedious.)

11) The swap space full condition is handled in a rather severe way.
If a process tries to allocate another page in its working
set when swap space is zero and no backing store exists, it is killed.
(I know that this is not good, but it is worse to hang the system.)

12) Because of the swap space being allocated in blocks, it is possible
for a page that is allocated on swap space to never be used.  An
optimization has been made to the swap pager to reclaim the space,
thereby almost eliminating internal fragmentation of the swap
blocks.

13) The algorithms associated with vm_pageout have been improved to
decrease significantly the amount of CPU time used.  (Wakeups
of the pageout daemon have been minimized.)
13a) vm_page_alloc woke-up the page daemon MUCH too often.
13b) the swap pager output completion woke-up the page daemon too often.
13c) the probability of a page at the beginning of a queue needing
to be (deactivated or freed) is higher

14) The system has been modified to support discontiguous allocation of
physical memory.  This allows use of memory below 640K when the kernel
is loaded at 1MB.  Now, the system is configured to load only at 1MB,
because the cost is minimal (1/4 page table page, instead of 640K) and
every kernel loads at the same address.

15) There now is an internal option to tune the location of the kernel in
the virtual address space.  Additionally, the default base kernel
virtual address is now 0xF0000000, moved from 0xFE000000, allowing
up to a 256MB kernel virtual address space.  Currently we support
a usable kernel address space of (60-1)MB (as determined by the actual
number of allocated kernel ptes (15).)  (Actually, now the kernel uses
virtual addresses starting at 0xF0100000 because it is loaded at
1MB.)

John Dyson
David Greenman
21 files changed:
sys/vm/device_pager.c
sys/vm/lock.h
sys/vm/swap_pager.c
sys/vm/swap_pager.h
sys/vm/vm_fault.c
sys/vm/vm_glue.c
sys/vm/vm_init.c
sys/vm/vm_kern.c
sys/vm/vm_map.c
sys/vm/vm_map.h
sys/vm/vm_mmap.c
sys/vm/vm_object.c
sys/vm/vm_object.h
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_pageout.c
sys/vm/vm_pageout.h
sys/vm/vm_pager.c
sys/vm/vm_pager.h
sys/vm/vnode_pager.c
sys/vm/vnode_pager.h