From owner-svn-src-head@freebsd.org Sun Dec 31 21:36:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A60FEA89EB; Sun, 31 Dec 2017 21:36:44 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7205644F2; Sun, 31 Dec 2017 21:36:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVLagPI055313; Sun, 31 Dec 2017 21:36:42 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVLagVG055312; Sun, 31 Dec 2017 21:36:42 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201712312136.vBVLagVG055312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 31 Dec 2017 21:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327450 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 327450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 21:36:44 -0000 Author: alc Date: Sun Dec 31 21:36:42 2017 New Revision: 327450 URL: https://svnweb.freebsd.org/changeset/base/327450 Log: The variable "minslptime" is pointless and always has been, ever since its introduction in r83366. (At that time, this code appeared in vm/vm_glue.c, because vm/vm_swapout.c did not exist.) When the FOREACH_THREAD loop completes, we know that the sleep time for every thread is above whichever threshold is being applied. Reviewed by: kib X-MFC with: r327354 Modified: head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Sun Dec 31 21:29:20 2017 (r327449) +++ head/sys/vm/vm_swapout.c Sun Dec 31 21:36:42 2017 (r327450) @@ -729,10 +729,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); @@ -831,8 +830,6 @@ retry: goto nextproc; } - if (minslptime > slptime) - minslptime = slptime; thread_unlock(td); } @@ -841,15 +838,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);