From mboxrd@z Thu Jan 1 00:00:00 1970 From: Goswin von Brederlow Subject: Re: [00/41] Large Blocksize Support V7 (adds memmap support) Date: Mon, 17 Sep 2007 00:56:07 +0200 Message-ID: <87lkb643ug.fsf@informatik.uni-tuebingen.de> References: <20070911060349.993975297@sgi.com> <200709110452.20363.nickpiggin@yahoo.com.au> <20070911121225.GE13132@lazybastard.org> <20070915014449.4f9cdb51.akpm@linux-foundation.org> <87ir6c3z2l.fsf@informatik.uni-tuebingen.de> <20070915155100.GA21861@v2.random> <20070916181504.GB16406@skynet.ie> <20070916185052.GG6708@v2.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Mel Gorman , Goswin von Brederlow , Andrew Morton , Joern Engel , Nick Piggin , Christoph Lameter , torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , William Lee Irwin III , David Chinner , Jens Axboe , Badari Pulavarty , Maxim Levitsky , Fengguang Wu , swin wang , totty.lu@gmail.com, hugh@veritas.com To: Andrea Arcangeli Return-path: Received: from mx1.Informatik.Uni-Tuebingen.De ([134.2.12.5]:49094 "EHLO mx1.informatik.uni-tuebingen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753622AbXIPW4M (ORCPT ); Sun, 16 Sep 2007 18:56:12 -0400 In-Reply-To: <20070916185052.GG6708@v2.random> (Andrea Arcangeli's message of "Sun, 16 Sep 2007 20:50:52 +0200") Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Andrea Arcangeli writes: > You ignore one other bit, when "/usr/bin/free" says 1G is free, with > config-page-shift it's free no matter what, same goes for not mlocked > cache. With variable order page cache, /usr/bin/free becomes mostly a > lie as long as there's no 4k fallback (like fsblock). % free total used free shared buffers cached Mem: 1398784 1372956 25828 0 225224 321504 -/+ buffers/cache: 826228 572556 Swap: 1048568 20 1048548 When has free ever given any usefull "free" number? I can perfectly fine allocate another gigabyte of memory despide free saing 25MB. But that is because I know that the buffer/cached are not locked in. On the other hand 1GB can instantly vanish when I start a xen domain and anything relying on the free value would loose. The only sensible thing for an application concerned with swapping is to whatch the swapping and then reduce itself. Not the amount free. Although I wish there were some kernel interface to get a preasure value of how valuable free pages would be right now. I would like that for fuse so a userspace filesystem can do caching without cripling the kernel. MfG Goswin