Skip to content

Commit

Permalink
- make page trylock acquisition style the same as object trylock
Browse files Browse the repository at this point in the history
- fix missed re-ordering of page and object lock
  • Loading branch information
kmacy committed Jun 27, 2009
1 parent 7543bc4 commit 4bdbe0d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sys/vm/vm_pageout.c
Expand Up @@ -775,7 +775,7 @@ vm_pageout_scan(int pass)
continue;
}

if (vm_page_trylock(m) == 0 || (object = m->object) == NULL) {
if (!vm_page_trylock(m) || (object = m->object) == NULL) {
addl_page_shortage++;
continue;
}
Expand Down Expand Up @@ -1102,7 +1102,7 @@ vm_pageout_scan(int pass)
continue;
}

if (vm_page_trylock(m) == 0 || (object = m->object) == NULL) {
if (!vm_page_trylock(m) || (object = m->object) == NULL) {
m = next;
continue;
}
Expand Down Expand Up @@ -1344,15 +1344,15 @@ vm_pageout_page_stats()
m = next;
continue;
}
if (!VM_OBJECT_TRYLOCK(object) &&
!vm_pageout_fallback_object_lock(m, &next)) {
VM_OBJECT_UNLOCK(object);
vm_page_lock_assert(m, MA_NOTOWNED);
if (!vm_page_trylock(m) || (object = m->object) == NULL) {
m = next;
continue;
}
vm_page_lock_assert(m, MA_NOTOWNED);
if (vm_page_trylock(m) == 0) {
if (!VM_OBJECT_TRYLOCK(object) &&
!vm_pageout_fallback_object_lock(m, &next)) {
VM_OBJECT_UNLOCK(object);
vm_page_unlock(m);
m = next;
continue;
}
Expand Down

0 comments on commit 4bdbe0d

Please sign in to comment.