From owner-freebsd-stable@FreeBSD.ORG Tue Feb 1 09:49:26 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA05C106564A; Tue, 1 Feb 2011 09:49:26 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id D61838FC0C; Tue, 1 Feb 2011 09:49:25 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id EB9C471D08D; Tue, 1 Feb 2011 10:49:23 +0100 (CET) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 15.8165] X-CRM114-CacheID: sfid-20110201_10492_5F6B6611 X-CRM114-Status: Good ( pR: 15.8165 ) X-Spambayes-Classification: ham; 0.00 Received: from japan.t-online.private (japan.t-online.co.hu [195.228.243.99]) by people.fsn.hu (Postfix) with ESMTPSA id 9551C71D084; Tue, 1 Feb 2011 10:49:23 +0100 (CET) Message-ID: <4D47D723.6000106@fsn.hu> Date: Tue, 01 Feb 2011 10:49:23 +0100 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Kostik Belousov References: <4D36A2CF.1080508@fsn.hu> <20110119084648.GA28278@icarus.home.lan> <4D36B85B.8070201@fsn.hu> <20110119150200.GY2518@deviant.kiev.zoral.com.ua> <20110130110918.GR2518@deviant.kiev.zoral.com.ua> In-Reply-To: <20110130110918.GR2518@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org, freebsd-stable@freebsd.org, Ivan Voras Subject: Re: tmpfs is zero bytes (no free space), maybe a zfs bug? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2011 09:49:27 -0000 On 01/30/11 12:09, Kostik Belousov wrote: > On Wed, Jan 19, 2011 at 05:27:38PM +0100, Ivan Voras wrote: >> On 19 January 2011 16:02, Kostik Belousov wrote: >> >>>> http://people.freebsd.org/~ivoras/diffs/tmpfs.h.patch >>>> >>>> I don't think this is a complete solution but it's a start. If you can, >>>> try it and see if it helps. >>> This is not a start, and actually a step in the wrong direction. >>> Tmpfs is wrong now, but the patch would make the wrongness even bigger. >>> >>> Issue is that the current tmpfs calculation should not depend on the >>> length of the inactive queue or the amount of free pages. This data only >>> measures the pressure on the pagedaemon, and has absolutely no relation >>> to the amount of data that can be put into anonymous objects before the >>> system comes out of swap. >>> >>> vm_lowmem handler is invoked in two situations: >>> - when KVA cannot satisfy the request for the space allocation; >>> - when pagedaemon have to start the scan. >>> None of the situations has any direct correlation with the fact that >>> tmpfs needs to check, that is "Is there enough swap to keep all my >>> future anonymous memory requests ?". >>> >>> Might be, swap reservation numbers can be useful to the tmpfs reporting. >>> Also might be, tmpfs should reserve the swap explicitely on start, instead >>> of making attempts to guess how much can be allocated at random moment. >> Thank you for your explanation! I'm still not very familiar with VM >> and VFS. Could you also read my report at >> http://www.mail-archive.com/freebsd-current@freebsd.org/msg126491.html >> ? I'm curious about the fact that there is lots of 'free' memory here >> in the same situation. > This is another ugliness in the dynamic calculation. Your wired is around > 15GB, that is always greater then available swap + free + inactive. > As result, tmpfs_mem_info() always returns 0. > In this situation TMPFS_PAGES_MAX() seems to return negative value, and > then TMPFS_PAGES_AVAIL() clamps at 0. > Well, if nobody can take care of this now, could you please state this in the BUGS section of the tmpfs man page? Thanks,