[Top][All Lists]

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

Re: [Qemu-discuss] question about qemu disk cache mode

From: Kevin Wolf
Subject: Re: [Qemu-discuss] question about qemu disk cache mode
Date: Wed, 4 Sep 2013 11:45:17 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 04.09.2013 um 11:07 hat xuanmao_001 geschrieben:
> I understand the physical disk cache and host page cache.
> I want to the difference between guest disk write cache and host page cache
> that described with "Caching modes in Qemu" in
> https://events.linuxfoundation.org/slides/2011/linuxcon-japan/lcj2011_hajnoczi.pdf
> give me some more information please, thanks.

It simply describes whether the guest will see a volatile write cache.
This is the case if any writeback cache is involved in the stack, be it
the host kernel page cache or the host disk write cache. Only if the
whole stack uses writethrough caching, the guest won't see a volatile
write cache.


> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> xuanmao_001
> From: Kevin Wolf
> Date: 2013-09-04 16:00
> To: xuanmao_001
> CC: qemu-devel; qemu-discuss
> Subject: Re: question about qemu disk cache mode
> Am 04.09.2013 um 05:47 hat xuanmao_001 geschrieben:
> > Dear qemuers:
> >  
> > my qemu-kvm version is 1.0.1
> > I would like to figure out the qemu disk cache mode. I have visited the
> > qemu-options.hx
> > there is two cache that I didn't understand: the host cache page and the 
> > qemu
> > disk write cache.
> >  
> > Is "host page cache" only used for read. and "qemu disk write cache" used 
> > for
> > writing.
> >  
> > which cache the data reached first? host page cache or qemu disk write 
> > cache?
> You're probably misunderstanding the latter, I assume that what you've
> read about is the "disk cache", not a "qemu disk cache". This is the
> cache on your hardware, the physical hard disk. The host page cache is
> the caching that the Linux kernel does for every file (unless it's
> bypassed with O_DIRECT, with is exposed as cache=none/directsync in
> qemu). None of this is implemented in or specific to qemu.
> When you write data, it reaches the page cache in the kernel first (if
> it is used at all), and then the cache on the hard disk.
> Hope this helps.
> Kevin

reply via email to

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