From owner-svn-src-all@freebsd.org Fri Nov 27 19:43:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5E64A3AA23; Fri, 27 Nov 2015 19:43:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 672B312F1; Fri, 27 Nov 2015 19:43:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARJhabL045125; Fri, 27 Nov 2015 19:43:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARJhaoo045124; Fri, 27 Nov 2015 19:43:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511271943.tARJhaoo045124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 27 Nov 2015 19:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291408 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 19:43:37 -0000 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 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; } }