From owner-svn-src-user@freebsd.org Thu Oct 15 03:12:21 2015 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 3EF86A158F0 for ; Thu, 15 Oct 2015 03:12:21 +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 0B8431FE7; Thu, 15 Oct 2015 03:12:20 +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 t9F3CKCe016743; Thu, 15 Oct 2015 03:12:20 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9F3CK6n016742; Thu, 15 Oct 2015 03:12:20 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201510150312.t9F3CK6n016742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 15 Oct 2015 03:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r289357 - 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.20 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: Thu, 15 Oct 2015 03:12:21 -0000 Author: alc Date: Thu Oct 15 03:12:19 2015 New Revision: 289357 URL: https://svnweb.freebsd.org/changeset/base/289357 Log: Like the inactive queue, we shouldn't find invalid pages in the laundry queue. 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 Thu Oct 15 02:55:01 2015 (r289356) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Thu Oct 15 03:12:19 2015 (r289357) @@ -1080,11 +1080,12 @@ vm_pageout_launder1(struct vm_domain *vm queues_locked = FALSE; /* - * Invalid pages can be easily freed. They cannot be - * mapped; vm_page_free() asserts this. + * Invalid pages cannot appear on a queue. If + * vm_pageout_fallback_object_lock() allowed a window + * where the page could be invalidated, it should + * detect this. */ - if (m->valid == 0) - goto free_page; + KASSERT(m->valid != 0, ("invalid page %p in laundry queue", m)); /* * If the page has been referenced and the object is not dead, @@ -1143,7 +1144,6 @@ vm_pageout_launder1(struct vm_domain *vm * destroyed the object. */ if (m->dirty == 0) { -free_page: vm_page_free(m); PCPU_INC(cnt.v_dfree); } else if ((object->flags & OBJ_DEAD) == 0) {