From owner-svn-src-user@freebsd.org Fri Oct 21 19:40:38 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 ED57FC1C3A9 for ; Fri, 21 Oct 2016 19:40:38 +0000 (UTC) (envelope-from markj@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 BC6B664E; Fri, 21 Oct 2016 19:40:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9LJebEN036899; Fri, 21 Oct 2016 19:40:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9LJebIG036898; Fri, 21 Oct 2016 19:40:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610211940.u9LJebIG036898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 21 Oct 2016 19:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307750 - 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.23 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: Fri, 21 Oct 2016 19:40:39 -0000 Author: markj Date: Fri Oct 21 19:40:37 2016 New Revision: 307750 URL: https://svnweb.freebsd.org/changeset/base/307750 Log: Have madvise(MADV_DONTNEED) move dirty pages to the laundry queue. Previously we would always requeue such pages at the tail of the inactive queue, which would further delay reclamation of a page already in the laundry queue. Discussed with: alc Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_page.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Fri Oct 21 19:23:51 2016 (r307749) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Fri Oct 21 19:40:37 2016 (r307750) @@ -3310,11 +3310,13 @@ vm_page_advise(vm_page_t m, int advice) /* * Place clean pages near the head of the inactive queue rather than * the tail, thus defeating the queue's LRU operation and ensuring that - * the page will be reused quickly. Dirty pages are given a chance to - * cycle once through the inactive queue before becoming eligible for - * laundering. + * the page will be reused quickly. Dirty pages not already in the + * laundry are moved there. */ - _vm_page_deactivate(m, m->dirty == 0); + if (m->dirty == 0) + _vm_page_deactivate(m, TRUE); + else + vm_page_launder(m); } /*