qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: xuanmao_001 <xuanmao_001@163.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	qemu-discuss <qemu-discuss@nongnu.org>
Subject: Re: [Qemu-devel] question about qemu disk cache mode
Date: Wed, 4 Sep 2013 17:07:48 +0800	[thread overview]
Message-ID: <2013090417074860959027@163.com> (raw)
In-Reply-To: 20130904080040.GA3562@dhcp-200-207.str.redhat.com

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

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.




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

[-- Attachment #2: Type: text/html, Size: 5295 bytes --]

  reply	other threads:[~2013-09-04  9:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04  3:47 [Qemu-devel] question about qemu disk cache mode xuanmao_001
2013-09-04  8:00 ` Kevin Wolf
2013-09-04  9:07   ` xuanmao_001 [this message]
2013-09-04  9:45     ` Kevin Wolf
2013-09-04 10:18       ` xuanmao_001
2013-09-04 10:03 ` Stefan Hajnoczi

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=2013090417074860959027@163.com \
    --to=xuanmao_001@163.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-discuss@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).