svn commit: r251788 - user/attilio/vmobj-readlock/sys/kern
Attilio Rao
attilio at FreeBSD.org
Sat Jun 15 10:09:21 UTC 2013
Author: attilio
Date: Sat Jun 15 10:09:20 2013
New Revision: 251788
URL: http://svnweb.freebsd.org/changeset/base/251788
Log:
Avoid to soft busy the page before to do vn_rdwr() in kern_sendfile().
That is unnecessary. The page is infact already wired and concurrent
accesses to the specified page and off should be serialized
already by vn_rdwr().
Sponsored by: EMC / Isilon storage division
Discussed with: jeff, dillon
Modified:
user/attilio/vmobj-readlock/sys/kern/uipc_syscalls.c
Modified: user/attilio/vmobj-readlock/sys/kern/uipc_syscalls.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/kern/uipc_syscalls.c Sat Jun 15 10:08:34 2013 (r251787)
+++ user/attilio/vmobj-readlock/sys/kern/uipc_syscalls.c Sat Jun 15 10:09:20 2013 (r251788)
@@ -2219,11 +2219,6 @@ retry_space:
else {
ssize_t resid;
- /*
- * Ensure that our page is still around
- * when the I/O completes.
- */
- vm_page_io_start(pg);
VM_OBJECT_WUNLOCK(obj);
/*
@@ -2237,11 +2232,9 @@ retry_space:
trunc_page(off), UIO_NOCOPY, IO_NODELOCKED |
IO_VMIO | ((MAXBSIZE / bsize) << IO_SEQSHIFT),
td->td_ucred, NOCRED, &resid, td);
- VM_OBJECT_WLOCK(obj);
- vm_page_io_finish(pg);
- if (!error)
- VM_OBJECT_WUNLOCK(obj);
mbstat.sf_iocnt++;
+ if (error)
+ VM_OBJECT_WLOCK(obj);
}
if (error) {
vm_page_lock(pg);
More information about the svn-src-user
mailing list