From owner-freebsd-fs@FreeBSD.ORG Wed Jan 19 16:28:29 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA66A106564A for ; Wed, 19 Jan 2011 16:28:29 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 77A1C8FC1A for ; Wed, 19 Jan 2011 16:28:29 +0000 (UTC) Received: by qwj9 with SMTP id 9so1050665qwj.13 for ; Wed, 19 Jan 2011 08:28:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Wauvl66oUnUCkGH3YnladgRZHUFuOr13Tfkg3Ekshig=; b=SMwJ/NqpEUUPnu9/JoYNMfKlEZRxjvqHzlX+Hdq93h0PQUaoiECofg3cm6+QPs3+DW x53S3IavbP+rINArCfvL2ngwci3GEnhYeZVwnRYOT+IaRGRXt5wnf68M+epa5qwISwT/ x2qcfV/JIfont8q96bnmJPuWcZ8EZ/TZPx5ZM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=qPw3DkSXqAcQBWCth4Bunzoy81KaqZSJ3ftw3AcRfj4SnKDuphQoagC8adTL5g0rkW V1I6lkuNgav5Nh097sKrFhG3dP+tp/O3PjB2HXxv9yo0fBAysP4+t33HH+oHgpa1hXZT 9XtAp8RiEHh53XYed7PvjmeWZWZKVQei7SMdU= Received: by 10.229.43.195 with SMTP id x3mr742241qce.291.1295454507645; Wed, 19 Jan 2011 08:28:27 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.44.70 with HTTP; Wed, 19 Jan 2011 08:27:38 -0800 (PST) In-Reply-To: <20110119150200.GY2518@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> From: Ivan Voras Date: Wed, 19 Jan 2011 17:27:38 +0100 X-Google-Sender-Auth: 8boe6dnzih0kqc3YGI2n35yPzzQ Message-ID: To: Kostik Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2011 16:28:29 -0000 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 =C2=A0the pressure on the pagedaemon, and has absolutely no rela= tion > 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, instea= d > 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. Do you think that there is something which can be done as a band-aid without a major modification to tmpfs?