Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2016 18:39:13 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r306908 - user/alc/PQ_LAUNDRY/sys/vm
Message-ID:  <201610091839.u99IdD9A056432@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sun Oct  9 18:39:13 2016
New Revision: 306908
URL: https://svnweb.freebsd.org/changeset/base/306908

Log:
  By the time that we've laundered a page, it has gone unreferenced for a
  long time, especially if it was background laundered.  So, it makes more
  sense to place the page nearer the head of the inactive queue than the
  tail.
  
  Reviewed by:	markj

Modified:
  user/alc/PQ_LAUNDRY/sys/vm/swap_pager.c

Modified: user/alc/PQ_LAUNDRY/sys/vm/swap_pager.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/vm/swap_pager.c	Sun Oct  9 13:59:38 2016	(r306907)
+++ user/alc/PQ_LAUNDRY/sys/vm/swap_pager.c	Sun Oct  9 18:39:13 2016	(r306908)
@@ -1549,13 +1549,16 @@ swp_pager_async_iodone(struct buf *bp)
 			 * For write success, clear the dirty
 			 * status, then finish the I/O ( which decrements the
 			 * busy count and possibly wakes waiter's up ).
+			 * A page is only written to swap after a period of
+			 * inactivity.  Therefore, we do not expect it to be
+			 * reused.
 			 */
 			KASSERT(!pmap_page_is_write_mapped(m),
 			    ("swp_pager_async_iodone: page %p is not write"
 			    " protected", m));
 			vm_page_undirty(m);
 			vm_page_lock(m);
-			vm_page_deactivate(m);
+			vm_page_deactivate_noreuse(m);
 			vm_page_unlock(m);
 			vm_page_sunbusy(m);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610091839.u99IdD9A056432>