svn commit: r328121 - stable/11/sys/vm

Konstantin Belousov kib at FreeBSD.org
Thu Jan 18 12:04:46 UTC 2018


Author: kib
Date: Thu Jan 18 12:04:45 2018
New Revision: 328121
URL: https://svnweb.freebsd.org/changeset/base/328121

Log:
  MFC r327450 (by alc):
  Eliminate "minslptime".

Modified:
  stable/11/sys/vm/vm_swapout.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_swapout.c
==============================================================================
--- stable/11/sys/vm/vm_swapout.c	Thu Jan 18 11:21:03 2018	(r328120)
+++ stable/11/sys/vm/vm_swapout.c	Thu Jan 18 12:04:45 2018	(r328121)
@@ -731,10 +731,9 @@ swapout_procs(int action)
 {
 	struct proc *p;
 	struct thread *td;
-	int minslptime, slptime;
+	int slptime;
 	bool didswap;
 
-	minslptime = 100000;
 	didswap = false;
 retry:
 	sx_slock(&allproc_lock);
@@ -833,8 +832,6 @@ retry:
 					goto nextproc;
 				}
 
-				if (minslptime > slptime)
-					minslptime = slptime;
 				thread_unlock(td);
 			}
 
@@ -843,15 +840,11 @@ retry:
 			 * or if this process is idle and the system is
 			 * configured to swap proactively, swap it out.
 			 */
-			if ((action & VM_SWAP_NORMAL) != 0 ||
-			    ((action & VM_SWAP_IDLE) != 0 &&
-			    minslptime > swap_idle_threshold2)) {
-				_PRELE(p);
-				if (swapout(p) == 0)
-					didswap = true;
-				PROC_UNLOCK(p);
-				goto retry;
-			}
+			_PRELE(p);
+			if (swapout(p) == 0)
+				didswap = true;
+			PROC_UNLOCK(p);
+			goto retry;
 		}
 nextproc:
 		PROC_UNLOCK(p);


More information about the svn-src-stable-11 mailing list