From owner-svn-src-user@freebsd.org Wed Aug 17 15:50:57 2016 Return-Path: Delivered-To: svn-src-user@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 79094BBCD9A for ; Wed, 17 Aug 2016 15:50:57 +0000 (UTC) (envelope-from alc@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 48AB614F3; Wed, 17 Aug 2016 15:50:57 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7HFoumA098256; Wed, 17 Aug 2016 15:50:56 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7HFouQV098255; Wed, 17 Aug 2016 15:50:56 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201608171550.u7HFouQV098255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 17 Aug 2016 15:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r304294 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2016 15:50:57 -0000 Author: alc Date: Wed Aug 17 15:50:56 2016 New Revision: 304294 URL: https://svnweb.freebsd.org/changeset/base/304294 Log: Update "gen" after a shortfall laundering so that the page daemon wakeup that coincided with the shortfall laundering can't again trigger a future background laundering. Reviewed by: markj Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Wed Aug 17 15:14:21 2016 (r304293) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Wed Aug 17 15:50:56 2016 (r304294) @@ -1096,6 +1096,7 @@ vm_pageout_laundry_worker(void *arg) KASSERT(cycle >= 0, ("negative cycle %d", cycle)); KASSERT(target >= 0, ("negative target %d", target)); launder = 0; + wakeups = VM_METER_PCPU_CNT(v_pdwakeups); /* * First determine whether we need to launder pages to meet a @@ -1126,6 +1127,7 @@ vm_pageout_laundry_worker(void *arg) */ if (vm_laundry_target() <= 0 || cycle == 0) { shortfall = prev_shortfall = target = 0; + gen = wakeups; } else { launder = target / cycle--; goto dolaundry; @@ -1144,7 +1146,6 @@ vm_pageout_laundry_worker(void *arg) */ ninact = vm_cnt.v_inactive_count; nlaundry = vm_cnt.v_laundry_count; - wakeups = VM_METER_PCPU_CNT(v_pdwakeups); if (target == 0 && wakeups != gen && nlaundry * bkgrd_launder_ratio >= ninact) { gen = wakeups;