[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] QEMU caching modes
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-discuss] QEMU caching modes |
Date: |
Mon, 20 Mar 2017 17:21:26 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Mar 17, 2017 at 09:52:27PM +0100, Jan Schermer wrote:
> I'm trying to understand when/what IO is synchronous and why, and so
> far what I'm seeing I can only describe as "weird".
>
> With cache=none, all IO should pass from the QEMU process to the device
> as-is. Right?
Here's the summary of what the 'cache' option does in practice:
cache=none -> direct I/O (the host page cache is bypassed).
See O_DIRECT in open(2)
cache=directsync -> direct I/O + flush after each write
cache=writethrough -> flush after each write
cache=unsafe -> guests flushes are ignored
cache=writeback -> no special options (this is the default)
> If so, that's not what I see - I see (with btrace) write IO as
> asynchronous (W) in the guest, but synchronous (WS) on the host.
Looks like what you're seeing is the direct I/O.
Berto