Direct IO != Synchronous IO I'm seeing Synchronous IO when I shouldn't.
Jan > On 20 Mar 2017, at 17:21, Alberto Garcia <[email protected]> wrote: > > 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 >
