diff options
author | peter <peter@FreeBSD.org> | 2000-05-21 12:50:18 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-05-21 12:50:18 +0000 |
commit | ee5cd6988fd6860707babbcfbe036049d375cafd (patch) | |
tree | 2df035f35d0064994e9cd134cd613f8e79cdb23f /sys/vm/vm_object.c | |
parent | 65f441c07383ce9e6f10124810cff27e1cb0f737 (diff) | |
download | FreeBSD-src-ee5cd6988fd6860707babbcfbe036049d375cafd.zip FreeBSD-src-ee5cd6988fd6860707babbcfbe036049d375cafd.tar.gz |
Implement an optimization of the VM<->pmap API. Pass vm_page_t's directly
to various pmap_*() functions instead of looking up the physical address
and passing that. In many cases, the first thing the pmap code was doing
was going to a lot of trouble to get back the original vm_page_t, or
it's shadow pv_table entry.
Inspired by: John Dyson's 1998 patches.
Also:
Eliminate pv_table as a seperate thing and build it into a machine
dependent part of vm_page_t. This eliminates having a seperate set of
structions that shadow each other in a 1:1 fashion that we often went to
a lot of trouble to translate from one to the other. (see above)
This happens to save 4 bytes of physical memory for each page in the
system. (8 bytes on the Alpha).
Eliminate the use of the phys_avail[] array to determine if a page is
managed (ie: it has pv_entries etc). Store this information in a flag.
Things like device_pager set it because they create vm_page_t's on the
fly that do not have pv_entries. This makes it easier to "unmanage" a
page of physical memory (this will be taken advantage of in subsequent
commits).
Add a function to add a new page to the freelist. This could be used
for reclaiming the previously wasted pages left over from preloaded
loader(8) files.
Reviewed by: dillon
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r-- | sys/vm/vm_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index c77e6d8..1b33f78 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -867,7 +867,7 @@ shadowlookup: * can without actually taking the step of unmapping * it. */ - pmap_clear_modify(VM_PAGE_TO_PHYS(m)); + pmap_clear_modify(m); m->dirty = 0; m->act_count = 0; vm_page_dontneed(m); |