From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 1B9436B006E for ; Tue, 1 Nov 2011 21:51:27 -0400 (EDT) Received: by ywa17 with SMTP id 17so10046423ywa.14 for ; Tue, 01 Nov 2011 18:51:25 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20111025122618.GA8072@quack.suse.cz> <20111031231031.GD10107@quack.suse.cz> <20111101230320.GH18701@quack.suse.cz> From: Andy Lutomirski Date: Tue, 1 Nov 2011 18:51:04 -0700 Message-ID: Subject: Re: Latency writing to an mlocked ext4 mapping Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Jan Kara Cc: Andreas Dilger , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-ext4@vger.kernel.org" On Tue, Nov 1, 2011 at 4:10 PM, Andy Lutomirski wrote= : > On Tue, Nov 1, 2011 at 4:03 PM, Jan Kara wrote: >> >> Avoiding IO during a minor fault would be a decent thing which might be >> worth pursuing. As you properly noted "stable pages during writeback" >> requirement is one obstacle which won't be that trivial to avoid though.= .. > > There's an easy solution that would be good enough for me: add a mount > option to turn off stable pages. > > Is the other problem just a race, perhaps? =A0__block_page_mkwrite calls > __block_write_begin (which calls get_block, which I think is where the > latency comes from) *before* wait_on_page_writeback, which means that > there might not be any space allocated yet. I think I'm right (other than calling it a race). If I change my code to d= o: - map the file (with MCL_FUTURE set) - fallocate - dirty all pages - fsync - dirty all pages again in the non-real-time thread, then a short test that was a mediocre reproducer seems to work. This is annoying, though -- I'm not generating twice as much write I/O as I used to. Is there any way to force the delalloc code to do its thing without triggering writeback? I don't think fallocate has this effect. --Andy -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org