svn commit: r306810 - in user/alc/PQ_LAUNDRY/sys: sys vm

Alan Cox alc at FreeBSD.org
Fri Oct 7 14:54:18 UTC 2016


Author: alc
Date: Fri Oct  7 14:54:16 2016
New Revision: 306810
URL: https://svnweb.freebsd.org/changeset/base/306810

Log:
  Count page reclamation shortfalls that lead to all-out laundering rather
  than laundry thread wakeups.
  
  Reviewed by:	markj

Modified:
  user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h
  user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c
  user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c

Modified: user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h	Fri Oct  7 14:46:34 2016	(r306809)
+++ user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h	Fri Oct  7 14:54:16 2016	(r306810)
@@ -77,8 +77,8 @@ struct vmmeter {
 	u_int v_intrans;	/* (p) intransit blocking page faults */
 	u_int v_reactivated;	/* (p) pages reactivated by the pagedaemon */
 	u_int v_pdwakeups;	/* (p) times daemon has awaken from sleep */
-	u_int v_ltwakeups;	/* (p) times laundry thread has been woken */
 	u_int v_pdpages;	/* (p) pages analyzed by daemon */
+	u_int v_pdshortfalls;	/* (p) page reclamation shortfalls */
 
 	u_int v_tcached;	/* (p) total pages cached */
 	u_int v_dfree;		/* (p) pages freed by daemon */

Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c	Fri Oct  7 14:46:34 2016	(r306809)
+++ user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c	Fri Oct  7 14:54:16 2016	(r306810)
@@ -287,9 +287,9 @@ VM_STATS_VM(v_vnodepgsin, "Vnode pages p
 VM_STATS_VM(v_vnodepgsout, "Vnode pages paged out");
 VM_STATS_VM(v_intrans, "In transit page faults");
 VM_STATS_VM(v_reactivated, "Pages reactivated by pagedaemon");
-VM_STATS_VM(v_ltwakeups, "Laundry thread wakeups");
 VM_STATS_VM(v_pdwakeups, "Pagedaemon wakeups");
 VM_STATS_VM(v_pdpages, "Pages analyzed by pagedaemon");
+VM_STATS_VM(v_pdshortfalls, "Page reclamation shortfalls");
 VM_STATS_VM(v_tcached, "Total pages cached");
 VM_STATS_VM(v_dfree, "Pages freed by pagedaemon");
 VM_STATS_VM(v_pfree, "Pages freed by exiting processes");

Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c	Fri Oct  7 14:46:34 2016	(r306809)
+++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c	Fri Oct  7 14:54:16 2016	(r306810)
@@ -1485,13 +1485,13 @@ drop_page:
 	    starting_page_shortage > 0) {
 		laundryq = &vm_dom[0].vmd_pagequeues[PQ_LAUNDRY];
 		vm_pagequeue_lock(laundryq);
-		if (page_shortage > 0)
+		if (page_shortage > 0) {
 			vm_laundry_request = VM_LAUNDRY_SHORTFALL;
-		else if (vm_laundry_request != VM_LAUNDRY_SHORTFALL)
+			PCPU_INC(cnt.v_pdshortfalls);
+		} else if (vm_laundry_request != VM_LAUNDRY_SHORTFALL)
 			vm_laundry_request = VM_LAUNDRY_BACKGROUND;
 		wakeup(&vm_laundry_request);
 		vm_pagequeue_unlock(laundryq);
-		PCPU_INC(cnt.v_ltwakeups);
 	}
 
 #if !defined(NO_SWAPPING)


More information about the svn-src-user mailing list