From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 25 13:41:49 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 331B7106566B for ; Sun, 25 Jul 2010 13:41:49 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id BEA2E8FC17 for ; Sun, 25 Jul 2010 13:41:46 +0000 (UTC) Received: by wwe15 with SMTP id 15so5732688wwe.31 for ; Sun, 25 Jul 2010 06:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=+MN1Bej/vBcNquCWcQC9tvuSvpsR5gBKGfI67C4dp1o=; b=HxNUBxrR69lewU4aZokBlpvh48g0nerwzOzWM6OxcqaHgYV/CMRRR0ozOkdTVZAfgr px+8LtyQUIP6sekxM3EQGKgxaVibhf2B/0kSa9HbjH8eY33vATftNOLclFsrpYrRDSip LInGu6PTLcyjOsEdo8fR/kAXHhas3TCuXgfAs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=uPxzYdcLnSXb17lQdgSa8FpqgRGjIXvLtjhYCGOGDzqN/bkq8RtfGmgyN97uNHWe/u K2NHvcB3GyNYu5dLW2O3T2BydQBCFTJhocrpRcJRN/XHejeeECIP81E6WVmrGmYbLq1O O2KT6h1vxA61DxkTv2sLWliL+/oXyXJFoElVw= Received: by 10.227.140.154 with SMTP id i26mr5950534wbu.199.1280065305903; Sun, 25 Jul 2010 06:41:45 -0700 (PDT) Received: from gumby.homeunix.com (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mx.google.com with ESMTPS id e31sm2151183wbe.5.2010.07.25.06.41.44 (version=SSLv3 cipher=RC4-MD5); Sun, 25 Jul 2010 06:41:45 -0700 (PDT) Date: Sun, 25 Jul 2010 14:41:41 +0100 From: RW To: freebsd-hackers@freebsd.org Message-ID: <20100725144141.6f1f33cc@gumby.homeunix.com> In-Reply-To: <4C4C0CD9.6000002@freebsd.org> References: <4C4B4BAB.3000005@freebsd.org> <20100725003144.3cfead39@gumby.homeunix.com> <4C4C0CD9.6000002@freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: pageout question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 13:41:49 -0000 On Sun, 25 Jul 2010 13:07:21 +0300 Andriy Gapon wrote: > on 25/07/2010 02:31 RW said the following: > > As I understand it the hysteresis is done inside vm_pageout_scan, > > and the expectation is that one pass will typically satisfy this > > because the design aims to keep enough clean pages in the inactive > > queue. > > But I am not sure about "clean pages in the inactive queue" ... But I > do not see any code ensuring level of _clean_ inactive pages. In FreeBSD the inactive queue contains disk cache pages which normally provide most of the clean pages needed. In addition pages are dribbled out to swap, and the resulting clean pages are placed at the back of the inactive queue to make another pass. > > > I'm not sure if the vm_paging_needed() call is correct or not, but > > it may be that that the intent is to avoid immediately going back > > to a depleted inactive queue when cache+free is within normal > > bounds, because it could result in avoidable paging to swap. > > Well, OTOH, if the current pass results in many pages being > re-activated and many pages still left on the inactive queue because > they are dirty (see maxlaunder in vm_pageout_scan), Dirty-pages make three passes through the inactive queue: twice dirty, once clean. They are paged-out at the end of the second paass, so it's unlike that they reactivated except under very heavy thrashing. > then it is > premature to quit paging when we only reached bare minimum of > available pages (see pass and maxlaunder again). IMHO, of course. It's not the bare minimum, that's another level that vm_page_count_min() tests for.