svn commit: r308002 - user/alc/PQ_LAUNDRY/sys/vm

Alan Cox alc at FreeBSD.org
Thu Oct 27 15:51:40 UTC 2016


Author: alc
Date: Thu Oct 27 15:51:39 2016
New Revision: 308002
URL: https://svnweb.freebsd.org/changeset/base/308002

Log:
  It's already the case that we repurpose the variable "pq" over the course
  of vm_pageout_scan() to refer to both the inactive and active queues.  Use
  it for the laundry queue as well.

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	Thu Oct 27 14:21:54 2016	(r308001)
+++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c	Thu Oct 27 15:51:39 2016	(r308002)
@@ -1265,7 +1265,7 @@ static bool
 vm_pageout_scan(struct vm_domain *vmd, int pass)
 {
 	vm_page_t m, next;
-	struct vm_pagequeue *pq, *laundryq;
+	struct vm_pagequeue *pq;
 	vm_object_t object;
 	long min_scan;
 	int act_delta, addl_page_shortage, deficit, inactq_shortage, maxscan;
@@ -1494,15 +1494,15 @@ drop_page:
 	 */
 	if (vm_laundry_request == VM_LAUNDRY_IDLE &&
 	    starting_page_shortage > 0) {
-		laundryq = &vm_dom[0].vmd_pagequeues[PQ_LAUNDRY];
-		vm_pagequeue_lock(laundryq);
+		pq = &vm_dom[0].vmd_pagequeues[PQ_LAUNDRY];
+		vm_pagequeue_lock(pq);
 		if (page_shortage > 0) {
 			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);
+		vm_pagequeue_unlock(pq);
 	}
 
 #if !defined(NO_SWAPPING)


More information about the svn-src-user mailing list