svn commit: r351331 - head/sys/vm

Mark Johnston markj at FreeBSD.org
Wed Aug 21 15:52:11 UTC 2019


Author: markj
Date: Wed Aug 21 15:52:10 2019
New Revision: 351331
URL: https://svnweb.freebsd.org/changeset/base/351331

Log:
  Don't requeue active pages in vm_swapout_object_deactivate_pages().
  
  As of r332974 the page daemon does not requeue pages during a scan
  of the active queue, so there is not much value in doing so here
  either.
  
  Reviewed by:	alc, dougm, kib
  MFC after:	1 week
  Sponsored by:	Netflix
  Differential Revision:	https://reviews.freebsd.org/D21343

Modified:
  head/sys/vm/vm_swapout.c

Modified: head/sys/vm/vm_swapout.c
==============================================================================
--- head/sys/vm/vm_swapout.c	Wed Aug 21 14:52:12 2019	(r351330)
+++ head/sys/vm/vm_swapout.c	Wed Aug 21 15:52:10 2019	(r351331)
@@ -226,20 +226,22 @@ vm_swapout_object_deactivate_pages(pmap_t pmap, vm_obj
 				vm_page_activate(p);
 				p->act_count += act_delta;
 			} else if (vm_page_active(p)) {
+				/*
+				 * The page daemon does not requeue pages
+				 * after modifying their activation count.
+				 */
 				if (act_delta == 0) {
 					p->act_count -= min(p->act_count,
 					    ACT_DECLINE);
 					if (!remove_mode && p->act_count == 0) {
 						pmap_remove_all(p);
 						vm_page_deactivate(p);
-					} else
-						vm_page_requeue(p);
+					}
 				} else {
 					vm_page_activate(p);
 					if (p->act_count < ACT_MAX -
 					    ACT_ADVANCE)
 						p->act_count += ACT_ADVANCE;
-					vm_page_requeue(p);
 				}
 			} else if (vm_page_inactive(p))
 				pmap_remove_all(p);


More information about the svn-src-all mailing list