diff options
author | alc <alc@FreeBSD.org> | 2006-08-04 05:53:20 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2006-08-04 05:53:20 +0000 |
commit | fe447f8ea1018cf457bdb3b6c0c0d5865aec9c40 (patch) | |
tree | f37d3b8939d373d65c34e85d6572b9dfae07ce27 | |
parent | cbc0dafbb208890d3f87d3708214d2da7160fbc0 (diff) | |
download | FreeBSD-src-fe447f8ea1018cf457bdb3b6c0c0d5865aec9c40.zip FreeBSD-src-fe447f8ea1018cf457bdb3b6c0c0d5865aec9c40.tar.gz |
The page queues lock is no longer required by vm_page_io_start(). Reduce
the scope of the page queues lock in kern_sendfile() accordingly.
-rw-r--r-- | sys/kern/uipc_syscalls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 8245978..08cdd1b 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -2038,7 +2038,6 @@ retry_lookup: VM_OBJECT_LOCK(obj); goto retry_lookup; } - vm_page_lock_queues(); } else { vm_page_lock_queues(); if (vm_page_sleep_if_busy(pg, TRUE, "sfpbsy")) @@ -2048,6 +2047,7 @@ retry_lookup: * under us. */ vm_page_wire(pg); + vm_page_unlock_queues(); } /* @@ -2066,7 +2066,6 @@ retry_lookup: * completes. */ vm_page_io_start(pg); - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(obj); /* @@ -2089,12 +2088,14 @@ retry_lookup: VM_OBJECT_LOCK(obj); vm_page_lock_queues(); vm_page_io_finish(pg); + vm_page_unlock_queues(); if (!error) VM_OBJECT_UNLOCK(obj); mbstat.sf_iocnt++; } if (error) { + vm_page_lock_queues(); vm_page_unwire(pg, 0); /* * See if anyone else might know about this page. @@ -2112,7 +2113,6 @@ retry_lookup: SOCKBUF_UNLOCK(&so->so_snd); goto done; } - vm_page_unlock_queues(); /* * Get a sendfile buf. We usually wait as long as necessary, |