Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Nov 2015 19:43:36 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r291408 - head/sys/vm
Message-ID:  <201511271943.tARJhaoo045124@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Nov 27 19:43:36 2015
New Revision: 291408
URL: https://svnweb.freebsd.org/changeset/base/291408

Log:
  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

Modified:
  head/sys/vm/vm_pageout.c

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c	Fri Nov 27 19:03:59 2015	(r291407)
+++ head/sys/vm/vm_pageout.c	Fri Nov 27 19:43:36 2015	(r291408)
@@ -729,32 +729,33 @@ vm_pageout_grow_cache(int tries, vm_padd
 	 * 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;
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511271943.tARJhaoo045124>