Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Oct 2015 09:02:18 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r289495 - user/alc/PQ_LAUNDRY/sys/vm
Message-ID:  <201510180902.t9I92INQ095397@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sun Oct 18 09:02:17 2015
New Revision: 289495
URL: https://svnweb.freebsd.org/changeset/base/289495

Log:
  Deal with an XXX comment: A dirty but weakly referenced page should
  remain in the laundry queue, not move to the inactive queue.
  
  Update a comment.

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

Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c	Sun Oct 18 08:13:51 2015	(r289494)
+++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c	Sun Oct 18 09:02:17 2015	(r289495)
@@ -1113,10 +1113,8 @@ vm_pageout_launder1(struct vm_domain *vm
  				 */
 				m->act_count += act_delta + ACT_ADVANCE;
 				goto drop_page;
-			} else if ((object->flags & OBJ_DEAD) == 0) {
-				vm_page_deactivate(m);	// XXX
-				goto drop_page;
-			}
+			} else if ((object->flags & OBJ_DEAD) == 0)
+				goto requeue_page;
 		}
 
 		/*
@@ -1134,11 +1132,10 @@ vm_pageout_launder1(struct vm_domain *vm
 		}
 
 		/*
-		 * Clean pages can be freed, but dirty pages must be sent back
-		 * to the laundry, unless they belong to a dead object.
-		 * Requeueing dirty pages from dead objects is pointless, as
-		 * they are being paged out and freed by the thread that
-		 * destroyed the object.
+		 * Clean pages are freed, and dirty pages are paged out unless
+		 * they belong to a dead object.  Requeueing dirty pages from
+		 * dead objects is pointless, as they are being paged out and
+		 * freed by the thread that destroyed the object.
 		 */
 		if (m->dirty == 0) {
 free_page:
@@ -1153,6 +1150,7 @@ free_page:
 			else
 				pageout_ok = TRUE;
 			if (!pageout_ok) {
+requeue_page:
 				vm_pagequeue_lock(pq);
 				queues_locked = TRUE;
 				vm_page_requeue_locked(m);



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