diff options
author | alc <alc@FreeBSD.org> | 2010-05-03 05:41:50 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-05-03 05:41:50 +0000 |
commit | 387e15c45aad8ee988d094eebcf76078a1a4752c (patch) | |
tree | 63203bfa05c5420331af4dfe5225e91b49587bae /sys/kern/uipc_syscalls.c | |
parent | 46340f07933ebae5d0723021a44679b64cb1013b (diff) | |
download | FreeBSD-src-387e15c45aad8ee988d094eebcf76078a1a4752c.zip FreeBSD-src-387e15c45aad8ee988d094eebcf76078a1a4752c.tar.gz |
This is the first step in transitioning responsibility for synchronizing
access to the page's wire_count from the page queues lock to the page lock.
Submitted by: kmacy
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 3271235..a137875 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1715,6 +1715,7 @@ sf_buf_mext(void *addr, void *args) m = sf_buf_page(args); sf_buf_free(args); + vm_page_lock(m); vm_page_lock_queues(); vm_page_unwire(m, 0); /* @@ -1725,6 +1726,7 @@ sf_buf_mext(void *addr, void *args) if (m->wire_count == 0 && m->object == NULL) vm_page_free(m); vm_page_unlock_queues(); + vm_page_unlock(m); if (addr == NULL) return; sfs = addr; @@ -2136,6 +2138,7 @@ retry_space: if ((sf = sf_buf_alloc(pg, (mnw ? SFB_NOWAIT : SFB_CATCH))) == NULL) { mbstat.sf_allocfail++; + vm_page_lock(pg); vm_page_lock_queues(); vm_page_unwire(pg, 0); /* @@ -2144,6 +2147,7 @@ retry_space: if (pg->wire_count == 0 && pg->object == NULL) vm_page_free(pg); vm_page_unlock_queues(); + vm_page_unlock(pg); error = (mnw ? EAGAIN : EINTR); break; } |