diff options
author | kib <kib@FreeBSD.org> | 2015-11-27 19:43:36 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-11-27 19:43:36 +0000 |
commit | d3add9250edf9abedf7120b8b914f206a51d3c2e (patch) | |
tree | 8f0fa635dc345dd930174d44a40837f1ccdc8d59 /sys/vm | |
parent | 486953399a5b9ac2d5d2e6af4189733f3a7f04cb (diff) | |
download | FreeBSD-src-d3add9250edf9abedf7120b8b914f206a51d3c2e.zip FreeBSD-src-d3add9250edf9abedf7120b8b914f206a51d3c2e.tar.gz |
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
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_pageout.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 2c7b10e..4997c82 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -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; } } |