Testing whether a page is dirty does not require the page lock. Moreover,
it may involve a pmap operation that iterates over the page's PV list, so unnecessarily holding the page lock is undesirable. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
c614d0a443
commit
eb5d39694e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287121
@ -415,10 +415,13 @@ vm_pageout_cluster(vm_page_t m)
|
||||
ib = 0;
|
||||
break;
|
||||
}
|
||||
vm_page_lock(p);
|
||||
vm_page_test_dirty(p);
|
||||
if (p->dirty == 0 ||
|
||||
p->queue != PQ_INACTIVE ||
|
||||
if (p->dirty == 0) {
|
||||
ib = 0;
|
||||
break;
|
||||
}
|
||||
vm_page_lock(p);
|
||||
if (p->queue != PQ_INACTIVE ||
|
||||
p->hold_count != 0) { /* may be undergoing I/O */
|
||||
vm_page_unlock(p);
|
||||
ib = 0;
|
||||
@ -442,10 +445,11 @@ vm_pageout_cluster(vm_page_t m)
|
||||
|
||||
if ((p = vm_page_next(ps)) == NULL || vm_page_busied(p))
|
||||
break;
|
||||
vm_page_lock(p);
|
||||
vm_page_test_dirty(p);
|
||||
if (p->dirty == 0 ||
|
||||
p->queue != PQ_INACTIVE ||
|
||||
if (p->dirty == 0)
|
||||
break;
|
||||
vm_page_lock(p);
|
||||
if (p->queue != PQ_INACTIVE ||
|
||||
p->hold_count != 0) { /* may be undergoing I/O */
|
||||
vm_page_unlock(p);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user