Increase the scope of the page queue lock in vm_pageout_scan().

Approved by:	re (blanket)
This commit is contained in:
Alan Cox 2002-12-01 00:02:39 +00:00
parent be5b142531
commit 78f7187d01

View File

@ -770,6 +770,7 @@ vm_pageout_scan(int pass)
continue;
}
vm_page_lock_queues();
/*
* If the object is not being used, we ignore previous
* references.
@ -789,7 +790,6 @@ vm_pageout_scan(int pass)
*/
} else if (((m->flags & PG_REFERENCED) == 0) &&
(actcount = pmap_ts_referenced(m))) {
vm_page_lock_queues();
vm_page_activate(m);
vm_page_unlock_queues();
m->act_count += (actcount + ACT_ADVANCE);
@ -805,7 +805,6 @@ vm_pageout_scan(int pass)
if ((m->flags & PG_REFERENCED) != 0) {
vm_page_flag_clear(m, PG_REFERENCED);
actcount = pmap_ts_referenced(m);
vm_page_lock_queues();
vm_page_activate(m);
vm_page_unlock_queues();
m->act_count += (actcount + ACT_ADVANCE + 1);
@ -823,6 +822,7 @@ vm_pageout_scan(int pass)
} else {
vm_page_dirty(m);
}
vm_page_unlock_queues();
/*
* Invalid pages can be easily freed