qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Question about cache flushes' implementation in cache


From: Michal Soltys
Subject: Re: [Qemu-discuss] Question about cache flushes' implementation in cache=writeback mode
Date: Tue, 9 Aug 2016 22:15:40 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 2016-08-09 20:38, Michal Soltys wrote:
> Hi,
> 
> 
> If we have cache=writeback (default since 2012-8) enabled, does it imply
> that essentially any request in guest with REQ_FLUSH (REQ_PREFLUSH now)
> set is equivalent of doing sync() on the host (as the exposed storage
> basically has a gigantic cache in form of host's page cache) ? Or is
> there some subtle/more fine grained control over this ?
> 
> I'm asking, as in case of for example host with multiple VMs using
> separate physical disks, single flush from one VM causes expensive
> host-wide sync of everything - and in such scenario cache=none sounds
> like much more sensible approach.
> 
> Or maybe there's something more fundamental I'm misunderstanding here ..
> 
> 

I just realised that fdatasync() on descriptor of underlying storage
should be sufficient, so (if that's true) the question in the second
section above no longer makes sense.

The first question (with s/sync/fdatasync) still stands, if that's how
it's actually handled from the perspective of a guest trying to flush
volatile cache (itow page cache of the host).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]