From: Linus Torvalds Subject: Re: ftruncate-mmap: pages are lost after writing to mmaped file. Date: Thu, 26 Mar 2009 16:02:03 -0700 (PDT) Message-ID: References: <604427e00903181244w360c5519k9179d5c3e5cd6ab3@mail.gmail.com> <20090324125510.GA9434@duck.suse.cz> <20090324132637.GA14607@duck.suse.cz> <200903250130.02485.nickpiggin@yahoo.com.au> <20090324144709.GF23439@duck.suse.cz> <1237906563.24918.184.camel@twins> <20090324152959.GG23439@duck.suse.cz> <20090326084723.GB8207@skywalker> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Jan Kara , Peter Zijlstra , Nick Piggin , "Martin J. Bligh" , linux-ext4@vger.kernel.org, Ying Han , Andrew Morton , linux-kernel , linux-mm , guichaz@gmail.com, Alex Khesin , Mike Waychison , Rohit Seth To: "Aneesh Kumar K.V" Return-path: In-Reply-To: <20090326084723.GB8207@skywalker> Sender: owner-linux-mm@kvack.org List-Id: linux-ext4.vger.kernel.org On Thu, 26 Mar 2009, Aneesh Kumar K.V wrote: > > >page faults doing allocation can take a > > *long* time > > That is true Btw, this is actually a feature rather than a bug. We want to slow down the writer, which is why we also do dirty page balancing when marking a page dirty. Basically, if block allocation is a performance problem, then it should be a performance problem that is attributed to the process that _causes_ it, rather than to some random poor unrelated process that then later ends up writing the page out because it wants to use some memory. This is why tracking dirty pages is so important. Yes, it also avoids various nasty overcommit situations, but the whole "make it hurt for the person responsible, rather than a random innocent bystander" is the more important part of it. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org