diff options
author | alc <alc@FreeBSD.org> | 2002-10-19 18:34:39 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-10-19 18:34:39 +0000 |
commit | 22918c79b0ce8a02d9425554b60f35955306f60a (patch) | |
tree | 88f4a80e77d2148a374337006d0530d2d24d5236 /sys/vm/vm_page.c | |
parent | 1ca1d78db817fa026492fd83eeaa4a3769fe34d1 (diff) | |
download | FreeBSD-src-22918c79b0ce8a02d9425554b60f35955306f60a.zip FreeBSD-src-22918c79b0ce8a02d9425554b60f35955306f60a.tar.gz |
Complete the page queues locking needed for the page-based copy-
on-write (COW) mechanism. (This mechanism is used by the zero-copy
TCP/IP implementation.)
- Extend the scope of the page queues lock in vm_fault()
to cover vm_page_cowfault().
- Modify vm_page_cowfault() to release the page queues lock
if it sleeps.
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 74b520c..f8730c1 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1815,10 +1815,16 @@ vm_page_cowfault(vm_page_t m) retry_alloc: vm_page_remove(m); - mnew = vm_page_alloc(object, pindex, VM_ALLOC_NORMAL); + /* + * An interrupt allocation is requested because the page + * queues lock is held. + */ + mnew = vm_page_alloc(object, pindex, VM_ALLOC_INTERRUPT); if (mnew == NULL) { vm_page_insert(m, object, pindex); + vm_page_unlock_queues(); VM_WAIT; + vm_page_lock_queues(); goto retry_alloc; } |