svn commit: r206827 -
user/kmacy/head_page_lock_2/sys/dev/cxgb/ulp/tom
Kip Macy
kmacy at FreeBSD.org
Mon Apr 19 04:22:45 UTC 2010
Author: kmacy
Date: Mon Apr 19 04:22:45 2010
New Revision: 206827
URL: http://svn.freebsd.org/changeset/base/206827
Log:
update cxgb_vm for page lock
Modified:
user/kmacy/head_page_lock_2/sys/dev/cxgb/ulp/tom/cxgb_vm.c
Modified: user/kmacy/head_page_lock_2/sys/dev/cxgb/ulp/tom/cxgb_vm.c
==============================================================================
--- user/kmacy/head_page_lock_2/sys/dev/cxgb/ulp/tom/cxgb_vm.c Mon Apr 19 04:09:20 2010 (r206826)
+++ user/kmacy/head_page_lock_2/sys/dev/cxgb/ulp/tom/cxgb_vm.c Mon Apr 19 04:22:45 2010 (r206827)
@@ -90,7 +90,6 @@ vm_fault_hold_user_pages(vm_map_t map, v
* (and R/W if for write) if so just mark pages as held (and
* dirty if for write) and return
*/
- vm_page_lock_queues();
for (pages = mp, faults = 0, va = addr; va < end;
va += PAGE_SIZE, pages++) {
/*
@@ -114,7 +113,6 @@ vm_fault_hold_user_pages(vm_map_t map, v
vm_page_dirty(m);
}
- vm_page_unlock_queues();
if (faults == 0)
return (0);
@@ -141,13 +139,13 @@ vm_fault_hold_user_pages(vm_map_t map, v
error:
log(LOG_WARNING,
"vm_fault bad return rv=%d va=0x%zx\n", rv, va);
- vm_page_lock_queues();
for (pages = mp, va = addr; va < end; va += PAGE_SIZE, pages++)
if (*pages) {
+ vm_page_lock(*pages);
vm_page_unhold(*pages);
+ vm_page_unlock(*pages);
*pages = NULL;
}
- vm_page_unlock_queues();
return (EFAULT);
}
@@ -156,10 +154,10 @@ vm_fault_unhold_pages(vm_page_t *mp, int
{
KASSERT(count >= 0, ("negative count %d", count));
- vm_page_lock_queues();
while (count--) {
+ vm_page_lock(*mp);
vm_page_unhold(*mp);
+ vm_page_unlock(*mp);
mp++;
}
- vm_page_unlock_queues();
}
More information about the svn-src-user
mailing list