From owner-svn-src-head@freebsd.org Thu Jul 9 23:43:35 2015 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 606F3328A; Thu, 9 Jul 2015 23:43:35 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (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 13BE975B; Thu, 9 Jul 2015 23:43:34 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.15.0.59/8.15.0.59) with SMTP id t69NA6uf030270; Thu, 9 Jul 2015 18:13:57 -0500 Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by pp2.rice.edu with ESMTP id 1vg4gt1ue1-1; Thu, 09 Jul 2015 18:13:57 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel Received: from [10.87.78.176] (unknown [10.87.78.176]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh2.mail.rice.edu (Postfix) with ESMTPSA id 8DDFC500122; Thu, 9 Jul 2015 18:13:57 -0500 (CDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r285282 - head/sys/vm From: Alan Cox In-Reply-To: <20150708182901.GJ51988@strugglingcoder.info> Date: Thu, 9 Jul 2015 18:13:57 -0500 Cc: Alan Cox , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201507081746.t68Hk0To044278@repo.freebsd.org> <20150708182901.GJ51988@strugglingcoder.info> To: hiren panchasara X-Mailer: Apple Mail (2.1878.6) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.9 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1506180000 definitions=main-1507090332 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 09 Jul 2015 23:43:35 -0000 On Jul 8, 2015, at 1:29 PM, hiren panchasara wrote: > On 07/08/15 at 05:46P, Alan Cox wrote: >> Author: alc >> Date: Wed Jul 8 17:45:59 2015 >> New Revision: 285282 >> URL: https://svnweb.freebsd.org/changeset/base/285282 >>=20 >> Log: >> The intention of r254304 was to scan the active queue continuously. >> However, I've observed the active queue scan stopping when there are >> frequent free page shortages and the inactive queue is steadily = refilled >> by other mechanisms, such as the sequential access heuristic in = vm_fault() >> or madvise(2).=20 >=20 > What would be the actual downside/effect of this scenario? i.e. What = goes > wrong when active queue scan stops and what would I see/observe on a > system when the problem is going on - is what I want to understand. >=20 Basically, pages that haven=92t been used recently get stuck in the = active queue. Consequently, they are never reclaimed and repurposed to = hold newly accessed data. Instead, more recently used pages from the = inactive queue are reclaimed. Effectively, this reduces the amount of = physical memory that is available for caching file data, and so the = system (likely) performs more I/O operations than it would have with the = stuck pages problem corrected. >> To remedy this problem, record the time of the last active >> queue scan, and always scan a number of pages proportional to the = time >> since the last scan, regardless of whether that last scan was a >> timeout-triggered ("pass =3D=3D 0") or free-page-shortage-triggered = ("pass > >> 0") scan. >>=20 >> Also, on a timeout-triggered scan, allow a full scan of the active = queue >> when the system is short of inactive pages. >>=20 >> Reviewed by: kib >> MFC after: 6 weeks >> Sponsored by: EMC / Isilon Storage Division >=20 > [skip] >=20 > Thanks in advance. > Cheers, > Hiren