svn commit: r327213 - head/sys/vm

Mark Johnston markj at FreeBSD.org
Tue Dec 26 16:29:41 UTC 2017


Author: markj
Date: Tue Dec 26 16:29:39 2017
New Revision: 327213
URL: https://svnweb.freebsd.org/changeset/base/327213

Log:
  Ensure that pass > 0 when starting a scan with vm_pages_needed == 1.
  
  Otherwise the page daemon will not reclaim pages and thus will not
  wake threads sleeping in VM_WAIT.
  
  Reported and tested by:	pho
  Reviewed by:	alc, kib
  X-MFC with:	r327168
  Differential Revision:	https://reviews.freebsd.org/D13640

Modified:
  head/sys/vm/vm_pageout.c

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c	Tue Dec 26 16:23:18 2017	(r327212)
+++ head/sys/vm/vm_pageout.c	Tue Dec 26 16:29:39 2017	(r327213)
@@ -1836,6 +1836,8 @@ vm_pageout_worker(void *arg)
 			 */
 			if (vm_pages_needed) {
 				mtx_unlock(&vm_page_queue_free_mtx);
+				if (pass == 0)
+					pass++;
 			} else if (mtx_sleep(&vm_pageout_wanted,
 			    &vm_page_queue_free_mtx, PDROP | PVM, "psleep",
 			    hz) == 0) {


More information about the svn-src-all mailing list