From: Steve Ofsthun <sofsthun@virtualiron.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: James Harper <james.harper@bendigoit.com.au>,
xen-devel@lists.xensource.com
Subject: Re: HVM domain with write caching going on somewhere to disk
Date: Mon, 12 Nov 2007 12:53:28 -0500 [thread overview]
Message-ID: <47389318.2000407@virtualiron.com> (raw)
In-Reply-To: <C358A24F.18199%Keir.Fraser@cl.cam.ac.uk>
Keir Fraser wrote:
> On 8/11/07 11:08, "James Harper" <james.harper@bendigoit.com.au> wrote:
>
>>> No, it's trickier than that. Blkback sends I/O requests direct into
>> the
>>> block subsystem, bypassing the buffer cache. You can see there's
>> potential
>>> for confusion therefore!
>> Ah yes. That would probably do it. So I need to make sure that the
>> buffer cache is flushed (eg async writes in qemu?)... or maybe get qemu
>> to talk direct to the block subsystem in the same way... any
>> suggestions? I've already butchered ioemu to get this working so far
>> (changed the PCI ID's of the IDE interface so Windows won't detect it)
>> so I'm not afraid of doing more of it :)
>
> Qemu-dm should probably be specifying O_DIRECT when it opens guest storage
> volumes. There was discussion about this quite some time ago, but I don't
> think any patch was ever floated.
We had a patch against the non-AIO version of QEMU that used O_DIRECT.
Initially our motivation was strictly to fix any coherence issues with
PV drivers vs. QEMU. The patch was somewhat ugly due to the buffer
alignment requirements of using O_DIRECT. Discussions on the list at
the time indicated that AIO was soon to be integrated in QEMU and any
O_DIRECT work should wait since much of the same code paths were involved.
Further work using the O_DIRECT patch turned up performance concerns.
QEMU tended to generate many small I/Os which O_DIRECT turned into
synchronous I/Os. This resulted in O_DIRECT performance being
measurably slower than buffered I/O for QEMU emulated disk I/O loads.
For us this translated to slow install performance on HVM guests.
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.
We are in the process of porting this code to the latest xen-unstable.
When that is ready, we will submit it to the list.
Steve
next prev parent reply other threads:[~2007-11-12 17:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 10:40 HVM domain with write caching going on somewhere to disk James Harper
2007-11-08 10:45 ` Keir Fraser
2007-11-08 10:51 ` James Harper
2007-11-08 11:04 ` Keir Fraser
2007-11-08 11:08 ` James Harper
2007-11-08 11:23 ` Keir Fraser
2007-11-08 11:47 ` James Harper
2007-11-09 1:17 ` HVM domain with write caching going on somewhere todisk James Harper
2007-11-09 2:25 ` HVM domain with write caching going on somewheretodisk James Harper
2007-11-09 4:18 ` James Harper
2007-11-12 17:53 ` Steve Ofsthun [this message]
2007-11-12 21:57 ` HVM domain with write caching going on somewhere to disk James Harper
2007-11-08 11:51 ` Nowadays, does xen support multicore , such as cell or not? tgh
2007-11-08 14:05 ` Steven Hu
2007-11-08 14:09 ` weiming
2007-11-09 1:10 ` tgh
2007-11-09 16:56 ` Mark Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47389318.2000407@virtualiron.com \
--to=sofsthun@virtualiron.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=james.harper@bendigoit.com.au \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.