diff options
author | Peter Wemm <peter@FreeBSD.org> | 2000-05-21 12:50:18 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2000-05-21 12:50:18 +0000 |
commit | 0385347c1aa38a1402192d53fc91313dadc37cec (patch) | |
tree | 6184d41f83be8a3984813b76e0b83b7606d5322b /sys/cam | |
parent | 4f91f96d9057ed01674b8d37366903e85af27306 (diff) | |
download | src-0385347c1aa38a1402192d53fc91313dadc37cec.tar.gz src-0385347c1aa38a1402192d53fc91313dadc37cec.zip |
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
Notes
Notes:
svn path=/head/; revision=60755
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 94ed4afc4fa7..2d9bb6d1ba91 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -617,11 +617,9 @@ dadump(dev_t dev) while (num > 0) { if (is_physical_memory(addr)) { - pmap_enter(kernel_pmap, (vm_offset_t)CADDR1, - trunc_page(addr), VM_PROT_READ, TRUE); + pmap_kenter((vm_offset_t)CADDR1, trunc_page(addr)); } else { - pmap_enter(kernel_pmap, (vm_offset_t)CADDR1, - trunc_page(0), VM_PROT_READ, TRUE); + pmap_kenter((vm_offset_t)CADDR1, trunc_page(0)); } xpt_setup_ccb(&csio.ccb_h, periph->path, /*priority*/1); |