From owner-svn-src-stable-10@FreeBSD.ORG Mon Aug 4 01:14:28 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1766F61 for ; Mon, 4 Aug 2014 01:14:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8753627CA for ; Mon, 4 Aug 2014 01:14:28 +0000 (UTC) Received: from kib (uid 1100) (envelope-from kib@FreeBSD.org) id 5551 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Mon, 04 Aug 2014 01:14:28 +0000 From: Konstantin Belousov Date: Mon, 4 Aug 2014 01:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r269495 - in stable/10/sys: dev/md kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53dede74.5551.1b8015c4@svn.freebsd.org> X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2014 01:14:28 -0000 Author: kib Date: Mon Aug 4 01:14:27 2014 New Revision: 269495 URL: http://svnweb.freebsd.org/changeset/base/269495 Log: MFC r269190: For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in dirty page, which is written by the process. Modified: stable/10/sys/dev/md/md.c stable/10/sys/kern/uipc_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/md/md.c ============================================================================== --- stable/10/sys/dev/md/md.c Mon Aug 4 01:12:49 2014 (r269494) +++ stable/10/sys/dev/md/md.c Mon Aug 4 01:14:27 2014 (r269495) @@ -895,8 +895,10 @@ mdstart_swap(struct md_s *sc, struct bio else vm_page_activate(m); vm_page_unlock(m); - if (bp->bio_cmd == BIO_WRITE) + if (bp->bio_cmd == BIO_WRITE) { vm_page_dirty(m); + vm_pager_page_unswapped(m); + } /* Actions on further pages start at offset 0 */ p += PAGE_SIZE - offs; Modified: stable/10/sys/kern/uipc_shm.c ============================================================================== --- stable/10/sys/kern/uipc_shm.c Mon Aug 4 01:12:49 2014 (r269494) +++ stable/10/sys/kern/uipc_shm.c Mon Aug 4 01:14:27 2014 (r269495) @@ -199,6 +199,7 @@ uiomove_object_page(vm_object_t obj, siz if (uio->uio_rw == UIO_WRITE && error == 0) { VM_OBJECT_WLOCK(obj); vm_page_dirty(m); + vm_pager_page_unswapped(m); VM_OBJECT_WUNLOCK(obj); } vm_page_lock(m);