WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] HVM domain with write caching going on somewhere to disk

To: "Steve Ofsthun" <sofsthun@xxxxxxxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] HVM domain with write caching going on somewhere to disk
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Tue, 13 Nov 2007 08:57:34 +1100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 12 Nov 2007 13:58:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47389318.2000407@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C358A24F.18199%Keir.Fraser@xxxxxxxxxxxx> <47389318.2000407@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcglVSucV2xJYckVTNesPRAit+BwcgAIJ52A
Thread-topic: [Xen-devel] HVM domain with write caching going on somewhere to disk
Before I figured out that the problem I was having was nothing to do
with the buffer cache (I was returning an error to windows when it asked
me to flush my buffers, which upset it a bit), I also implemented
O_DIRECT by simply allocating another buffer (with the correct
alignment) in the raw_read and raw_write routines and copying the data
into there. Obviously it was horribly inefficient, but when the problem
I was having still occurred it told me that it must lie elsewhere.

I also tried using /dev/raw/rawX, which has similar restrictions to
O_DIRECT.

Another thing I discovered is that Windows 2003 (and probably others)
only makes two writes via the int13 routines, which I'm guessing is to
set a 'I am booting' flag, so that it can detect a failed boot on the
next startup. Once the windows driver is activated, obviously the int13
routines can no longer be used.

> Our current patch (against 3.1.2) uses fsync/fadvise to allow limited
> use of the buffer cache.  This improves I/O performance in QEMU (over
> O_DIRECT) while still maintaining device block coherence between PV
> driver/QEMU disk access.

That sounds like a good compromise.

Thanks

James

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>