summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-09-16 06:25:54 +0000
committerkib <kib@FreeBSD.org>2013-09-16 06:25:54 +0000
commit6796656333337e5530946dca854ffe0ce55b0cf0 (patch)
tree4db1f72cdac363c77df44aecb8f3e49bd8fb3732 /sys/vm/vm_fault.c
parent9867f4e99b817ebbf5d787e92b2a8e2fe14808a1 (diff)
downloadFreeBSD-src-6796656333337e5530946dca854ffe0ce55b0cf0.zip
FreeBSD-src-6796656333337e5530946dca854ffe0ce55b0cf0.tar.gz
Remove zero-copy sockets code. It only worked for anonymous memory,
and the equivalent functionality is now provided by sendfile(2) over posix shared memory filedescriptor. Remove the cow member of struct vm_page, and rearrange the remaining members. While there, make hold_count unsigned. Requested and reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (delphij)
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 85eeca1..26ad9f3 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -333,24 +333,6 @@ RetryFault:;
*/
fs.m = vm_page_lookup(fs.object, fs.pindex);
if (fs.m != NULL) {
- /*
- * check for page-based copy on write.
- * We check fs.object == fs.first_object so
- * as to ensure the legacy COW mechanism is
- * used when the page in question is part of
- * a shadow object. Otherwise, vm_page_cowfault()
- * removes the page from the backing object,
- * which is not what we want.
- */
- vm_page_lock(fs.m);
- if ((fs.m->cow) &&
- (fault_type & VM_PROT_WRITE) &&
- (fs.object == fs.first_object)) {
- vm_page_cowfault(fs.m);
- unlock_and_deallocate(&fs);
- goto RetryFault;
- }
-
/*
* Wait/Retry if the page is busy. We have to do this
* if the page is either exclusive or shared busy
@@ -374,7 +356,6 @@ RetryFault:;
* likely to reclaim it.
*/
vm_page_aflag_set(fs.m, PGA_REFERENCED);
- vm_page_unlock(fs.m);
if (fs.object != fs.first_object) {
if (!VM_OBJECT_TRYWLOCK(
fs.first_object)) {
@@ -400,6 +381,7 @@ RetryFault:;
vm_object_deallocate(fs.first_object);
goto RetryFault;
}
+ vm_page_lock(fs.m);
vm_page_remque(fs.m);
vm_page_unlock(fs.m);
OpenPOWER on IntegriCloud