From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f200.google.com (mail-qt0-f200.google.com [209.85.216.200]) by kanga.kvack.org (Postfix) with ESMTP id 351496B0033 for ; Mon, 23 Jan 2017 05:09:47 -0500 (EST) Received: by mail-qt0-f200.google.com with SMTP id g49so101262676qta.0 for ; Mon, 23 Jan 2017 02:09:47 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id y53si10436817qta.198.2017.01.23.02.09.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jan 2017 02:09:46 -0800 (PST) Date: Mon, 23 Jan 2017 11:09:41 +0100 From: Kevin Wolf Subject: Re: [Lsf-pc] [LSF/MM TOPIC] I/O error handling and fsync() Message-ID: <20170123100941.GA5745@noname.redhat.com> References: <20170110160224.GC6179@noname.redhat.com> <87k2a2ig2c.fsf@notabene.neil.brown.name> <20170113110959.GA4981@noname.redhat.com> <20170113142154.iycjjhjujqt5u2ab@thunk.org> <20170113160022.GC4981@noname.redhat.com> <87mveufvbu.fsf@notabene.neil.brown.name> <1484568855.2719.3.camel@poochiereds.net> <87o9yyemud.fsf@notabene.neil.brown.name> <1485127917.5321.1.camel@poochiereds.net> <20170123002158.xe7r7us2buc37ybq@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170123002158.xe7r7us2buc37ybq@thunk.org> Sender: owner-linux-mm@kvack.org List-ID: To: Theodore Ts'o Cc: Jeff Layton , NeilBrown , Rik van Riel , Christoph Hellwig , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, lsf-pc@lists.linux-foundation.org, Ric Wheeler Am 23.01.2017 um 01:21 hat Theodore Ts'o geschrieben: > On Sun, Jan 22, 2017 at 06:31:57PM -0500, Jeff Layton wrote: > > > > Ahh, sorry if I wasn't clear. > > > > I know Kevin posed this topic in the context of QEMU/KVM, and I figure > > that running virt guests (themselves doing all sorts of workloads) is a > > pretty common setup these days. That was what I meant by "use case" > > here. Obviously there are many other workloads that could benefit from > > (or be harmed by) changes in this area. > > > > Still, I think that looking at QEMU/KVM as a "application" and > > considering what we can do to help optimize that case could be helpful > > here (and might also be helpful for other workloads). > > Well, except for QEMU/KVM, Kevin has already confirmed that using > Direct I/O is a completely viable solution. (And I'll add it solves a > bunch of other problems, including page cache efficiency....) Yes, "don't ever use non-O_DIRECT in production" is probably workable as a solution to the "state after failed fsync()" problem, as long as it is consistently implemented throughout the stack. That is, if we use a network protocol in QEMU (NFS, gluster, etc.), the server needs to use O_DIRECT, too, if we don't want to get the same problem one level down the stack. I'm not sure if that's possible with all of them, but if it is, it's mostly just a matter of configuring them correctly. However, if we look at the greater problem of hanging requests that came up in the more recent emails of this thread, it is only moved rather than solved. Chances are that already write() would hang now instead of only fsync(), but we still have a hard time dealing with this. Kevin -- 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