From owner-svn-src-user@freebsd.org Thu Sep 1 18:03:36 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 00EFBBC9F34 for ; Thu, 1 Sep 2016 18:03:36 +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 C86B0672; Thu, 1 Sep 2016 18:03:35 +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 u81I3Zlx090208; Thu, 1 Sep 2016 18:03:35 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u81I3ZpZ090207; Thu, 1 Sep 2016 18:03:35 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201609011803.u81I3ZpZ090207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 1 Sep 2016 18:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r305217 - 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: Thu, 01 Sep 2016 18:03:36 -0000 Author: alc Date: Thu Sep 1 18:03:34 2016 New Revision: 305217 URL: https://svnweb.freebsd.org/changeset/base/305217 Log: Remove some dead code and add a comment. 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 Thu Sep 1 17:36:52 2016 (r305216) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Thu Sep 1 18:03:34 2016 (r305217) @@ -1582,16 +1582,7 @@ drop_page: if (m->act_count == 0) { /* Dequeue to avoid later lock recursion. */ vm_page_dequeue_locked(m); -#if 0 - /* - * This requires the object write lock. It might be a - * good idea during a page shortage, but might also - * cause contention with a concurrent attempt to launder - * pages from this object. - */ - if (m->object->ref_count != 0) - vm_page_test_dirty(m); -#endif + /* * When not short for inactive pages, let dirty pages go * through the inactive queue before moving to the @@ -1604,6 +1595,16 @@ drop_page: if (page_shortage <= 0) vm_page_deactivate(m); else { + /* + * Calling vm_page_test_dirty() here would + * require acquisition of the object's write + * lock. However, during a page shortage, + * directing dirty pages into the laundry + * queue is only an optimization and not a + * requirement. Therefore, we simply rely on + * the opportunistic updates to the page's + * dirty field by the pmap. + */ if (m->dirty == 0) { vm_page_deactivate(m); page_shortage -=