Date: Mon, 2 Oct 2017 07:14:32 +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: r324189 - head/sys/dev/md Message-ID: <201710020714.v927EWxk097270@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Mon Oct 2 07:14:32 2017 New Revision: 324189 URL: https://svnweb.freebsd.org/changeset/base/324189 Log: When mdstart_swap() accesses a page that is already in the active queue, mark the page as referenced rather than calling vm_page_activate(). This allows the page's act_count to grow beyond ACT_INIT and better reflect its usage. (See also r324146, which modified a function used by tmpfs, uiomove_object_page(), to behave in the same way.) Reviewed by: kib, markj MFC after: 2 weeks Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Mon Oct 2 06:48:56 2017 (r324188) +++ head/sys/dev/md/md.c Mon Oct 2 07:14:32 2017 (r324189) @@ -1111,7 +1111,10 @@ mdstart_swap(struct md_s *sc, struct bio *bp) if (m != NULL) { vm_page_xunbusy(m); vm_page_lock(m); - vm_page_activate(m); + if (vm_page_active(m)) + vm_page_reference(m); + else + vm_page_activate(m); vm_page_unlock(m); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710020714.v927EWxk097270>