Date: Sun, 11 Dec 2016 19:24:41 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309855 - in head/sys: fs/tmpfs kern Message-ID: <201612111924.uBBJOfC6098563@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Sun Dec 11 19:24:41 2016 New Revision: 309855 URL: https://svnweb.freebsd.org/changeset/base/309855 Log: When tmpfs and POSIX shm pagein a page for the sole purpose of performing truncation, immediately queue the page for asynchronous laundering rather than making the page pass through inactive queue first. Reviewed by: kib, markj Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/kern/uipc_shm.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Sun Dec 11 19:01:27 2016 (r309854) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sun Dec 11 19:24:41 2016 (r309855) @@ -1376,7 +1376,15 @@ retry: NULL); vm_page_lock(m); if (rv == VM_PAGER_OK) { - vm_page_deactivate(m); + /* + * Since the page was not resident, + * and therefore not recently + * accessed, immediately enqueue it + * for asynchronous laundering. The + * current operation is not regarded + * as an access. + */ + vm_page_launder(m); vm_page_unlock(m); vm_page_xunbusy(m); } else { Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Sun Dec 11 19:01:27 2016 (r309854) +++ head/sys/kern/uipc_shm.c Sun Dec 11 19:24:41 2016 (r309855) @@ -460,7 +460,15 @@ retry: NULL); vm_page_lock(m); if (rv == VM_PAGER_OK) { - vm_page_deactivate(m); + /* + * Since the page was not resident, + * and therefore not recently + * accessed, immediately enqueue it + * for asynchronous laundering. The + * current operation is not regarded + * as an access. + */ + vm_page_launder(m); vm_page_unlock(m); vm_page_xunbusy(m); } else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612111924.uBBJOfC6098563>