diff options
author | alc <alc@FreeBSD.org> | 2003-03-29 06:14:14 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-03-29 06:14:14 +0000 |
commit | 6f59be774d7b820d9fc3ec62a551dbb881c00d04 (patch) | |
tree | 0d26d230982c48b5d6defcaaa8f062e187a0a894 /sys/kern/uipc_cow.c | |
parent | 7d7faf316e9c5a228a2d89b980b0120ca7b564f9 (diff) | |
download | FreeBSD-src-6f59be774d7b820d9fc3ec62a551dbb881c00d04.zip FreeBSD-src-6f59be774d7b820d9fc3ec62a551dbb881c00d04.tar.gz |
Pass the vm_page's address to sf_buf_alloc(); map the vm_page as part
of sf_buf_alloc() instead of expecting sf_buf_alloc()'s caller to map it.
The ultimate reason for this change is to enable two optimizations:
(1) that there never be more than one sf_buf mapping a vm_page at a time
and (2) 64-bit architectures can transparently use their 1-1 virtual
to physical mapping (e.g., "K0SEG") avoiding the overhead of pmap_qenter()
and pmap_qremove().
Diffstat (limited to 'sys/kern/uipc_cow.c')
-rw-r--r-- | sys/kern/uipc_cow.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/uipc_cow.c b/sys/kern/uipc_cow.c index 26b3f4c..6dc23d1 100644 --- a/sys/kern/uipc_cow.c +++ b/sys/kern/uipc_cow.c @@ -144,9 +144,7 @@ socow_setup(struct mbuf *m0, struct uio *uio) /* * Allocate an sf buf */ - sf = sf_buf_alloc(); - sf->m = pp; - pmap_qenter(sf->kva, &pp, 1); + sf = sf_buf_alloc(pp); /* * attach to mbuf |