From owner-svn-src-user@freebsd.org Fri Oct 28 16:22:46 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 AC303C2429D for ; Fri, 28 Oct 2016 16:22:46 +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 7C0ECC4F; Fri, 28 Oct 2016 16:22:46 +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 u9SGMj9w019981; Fri, 28 Oct 2016 16:22:45 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9SGMjkY019980; Fri, 28 Oct 2016 16:22:45 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610281622.u9SGMjkY019980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 28 Oct 2016 16:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r308052 - 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, 28 Oct 2016 16:22:46 -0000 Author: alc Date: Fri Oct 28 16:22:45 2016 New Revision: 308052 URL: https://svnweb.freebsd.org/changeset/base/308052 Log: Tweak vm_pageout_flush()'s handling of the VM_PAGER_BAD case. In particular, don't move the page from its current queue unless it was in the laundry. And, if it was, then we don't expect it to be reused. Discussed with: 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 Fri Oct 28 16:21:31 2016 (r308051) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Fri Oct 28 16:22:45 2016 (r308052) @@ -554,13 +554,15 @@ vm_pageout_flush(vm_page_t *mc, int coun break; case VM_PAGER_BAD: /* - * Page outside of range of object. Right now we - * essentially lose the changes by pretending it - * worked. + * The page is outside the object's range. We pretend + * that the page out worked and clean the page, so the + * changes will be lost if the page is reclaimed by + * the page daemon. */ vm_page_undirty(mt); vm_page_lock(mt); - vm_page_deactivate(mt); + if (vm_page_in_laundry(mt)) + vm_page_deactivate_noreuse(mt); vm_page_unlock(mt); break; case VM_PAGER_ERROR: