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/
Home Products Support Community News


Re: [Xen-devel] Shouldn't backend devices for VMX domain disks be opened

To: Steve Dobbelstein <steved@xxxxxxxxxx>
Subject: Re: [Xen-devel] Shouldn't backend devices for VMX domain disks be opened with O_DIRECT?
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Thu, 02 Feb 2006 15:46:11 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 02 Feb 2006 21:56:23 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <OF036ACF80.77D96995-ON06257109.00744220-06257109.007689F3@xxxxxxxxxx>
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: <OF036ACF80.77D96995-ON06257109.00744220-06257109.007689F3@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
Steve Dobbelstein wrote:

While running some disk performance tests for VMX domains we noticed that
writes to the backend device for a VMX domain's disk go through the buffer
cache, that is, they are not written immediately to disk.  Shouldn't the
I/Os go straight to the backend device, i.e., the device should be opened
with O_DIRECT or some such?  From the domain's perspective it expects the
data to be physically on the device, but in reality it is not.   There are
things, such a writes to a file system journal, that the OS in the domain
will expect to be on disk.  If the whole system crashes before the buffer
cache in dom0 is written to disk, those writes may not be on the disk.
When the domain is started again it may find the file system in an
inconsistent state, due to writes to the journal that didn't make it to
disk, and may not be able to recover.

It seems to me that if a domain expects things to be physically on its
frontend device that they should be physically on the backend device as
well.  Or am I missing something from the bigger picture?
I would doubt it. Since it's usually opening a file, and qemu-dm is emulating a contigous disk, you probably want the buffer cache to reorder events.

Are you seeing a performance improvement?  Should be easy to check.


Anthony Liguori

Steve D.

Xen-devel mailing list

Xen-devel mailing list