In vm_pageout_grow_cache(), do not re-try the inactive queue when

active queue scan initiated write.

Re-trying from the inactive queue when doing active scan makes the
loop never end if number of domains is greater than 1 and inactive or
active scan cannot reach the target.

Reported and tested by:	Andrew Gallatin <gallatin@netflix.com>
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
This commit is contained in:
Konstantin Belousov 2015-11-27 19:43:36 +00:00
parent cdf23c193a
commit 2eb2f0d5e3

View File

@ -729,32 +729,33 @@ vm_pageout_grow_cache(int tries, vm_paddr_t low, vm_paddr_t high)
* the specified address range, as indicated by segments
* constituting the domain.
*/
again:
again_inact:
if (inactl < inactmax) {
if (vm_phys_domain_intersects(vm_dom[dom].vmd_segs,
low, high) &&
vm_pageout_launder(&vm_dom[dom].vmd_pagequeues[PQ_INACTIVE],
tries, low, high)) {
inactl++;
goto again;
goto again_inact;
}
if (++dom == vm_ndomains)
dom = 0;
if (dom != initial_dom)
goto again;
goto again_inact;
}
again_act:
if (actl < actmax) {
if (vm_phys_domain_intersects(vm_dom[dom].vmd_segs,
low, high) &&
vm_pageout_launder(&vm_dom[dom].vmd_pagequeues[PQ_ACTIVE],
tries, low, high)) {
actl++;
goto again;
goto again_act;
}
if (++dom == vm_ndomains)
dom = 0;
if (dom != initial_dom)
goto again;
goto again_act;
}
}