From owner-freebsd-stable@FreeBSD.ORG Sun Jan 30 11:09:23 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 EDFCD106564A; Sun, 30 Jan 2011 11:09:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 64C928FC14; Sun, 30 Jan 2011 11:09:21 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p0UB9ITx071618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 30 Jan 2011 13:09:18 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p0UB9Ik2056352; Sun, 30 Jan 2011 13:09:18 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p0UB9IoW056351; Sun, 30 Jan 2011 13:09:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 30 Jan 2011 13:09:18 +0200 From: Kostik Belousov To: Ivan Voras Message-ID: <20110130110918.GR2518@deviant.kiev.zoral.com.ua> References: <4D36A2CF.1080508@fsn.hu> <20110119084648.GA28278@icarus.home.lan> <4D36B85B.8070201@fsn.hu> <20110119150200.GY2518@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9OLhvBqktUnNquIT" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-fs@freebsd.org, freebsd-stable@freebsd.org 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: Sun, 30 Jan 2011 11:09:23 -0000 --9OLhvBqktUnNquIT Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 19, 2011 at 05:27:38PM +0100, Ivan Voras wrote: > On 19 January 2011 16:02, Kostik Belousov wrote: >=20 > >> 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 =9Athe pressure on the pagedaemon, and has absolutely no relat= ion > > 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, inst= ead > > of making attempts to guess how much can be allocated at random moment. >=20 > 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. >=20 > Do you think that there is something which can be done as a band-aid > without a major modification to tmpfs? --9OLhvBqktUnNquIT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk1FRt0ACgkQC3+MBN1Mb4hw+ACfevIR8rgj+TkhYYi9QDEGikyT cvkAn3TX2xPZRson6FNi/4EL3kKWn7LY =YpCa -----END PGP SIGNATURE----- --9OLhvBqktUnNquIT--