From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHv3b-0001eJ-P6 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 07:50:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHv3a-0007Gt-8x for qemu-devel@nongnu.org; Tue, 19 Mar 2013 07:50:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHv3Z-0007Gj-Vj for qemu-devel@nongnu.org; Tue, 19 Mar 2013 07:50:18 -0400 Message-ID: <514850D9.5010700@redhat.com> Date: Tue, 19 Mar 2013 12:49:45 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1363609123-20748-1-git-send-email-alex@alex.org.uk> <51471767.8030604@redhat.com> <7AC8953FE45335FB794B6DFE@Ximines.local> <51471F14.7030209@redhat.com> <6D0F4ACDA3B7FCF1A50F8B52@Ximines.local> <5147298C.8080900@redhat.com> <51473E82.1020806@redhat.com> <861AFE1A9C44444FD8BAEE16@Ximines.local> <5147512E.5050501@eu.citrix.com> <5147562E.1090203@redhat.com> <5148414C.7060303@redhat.com> <51484328.4030301@eu.citrix.com> <5148489C.70808@redhat.com> <45EC1ED73B198669B314A507@nimrod.local> In-Reply-To: <45EC1ED73B198669B314A507@nimrod.local> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Xen-devel] [PATCHv3] QEMU(upstream): Disable xen's use of O_DIRECT by default as it results in crashes. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh Cc: Ian Campbell , Stefano Stabellini , George Dunlap , Ian Jackson , qemu-devel@nongnu.org, xen-devel , Anthony Liguori Il 19/03/2013 12:44, Alex Bligh ha scritto: > If this isn't true, we have a problem anyway with (e.g.) emulated > devices which don't use O_DIRECT anyway. Yes, though that would be a libxl bug, not a QEMU bug. > And I had thought (I may be > wrong) using O_DIRECT does not guarantee no read caching with NFS; > O_DIRECT merely guarantees the page cache is not used under Linux > and isn't defined under POSIX: > http://www.spinics.net/lists/linux-nfs/msg17472.html Read caching on the server is fine, because it is the same server that was used for the writes. O_DIRECT bypasses the client's page cache, and that's enough for our purposes. > If it were just a write caching issue, we could use O_DSYNC instead of > O_DIRECT, which would at least ensure the copy from userspace. O_DSYNC is not necessary. We do issue the appropriate fsync/fdatasync. What O_DSYNC does is add an implicit fdatasync after every write, basically. Paolo