Date: Mon, 4 Aug 2014 01:14:28 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> 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 Message-ID: <53dede74.5551.1b8015c4@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53dede74.5551.1b8015c4>