All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: aliguro@us.ibm.com, Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org, ryanh@us.ibm.com,
	Zhi Yong Wu <zwu.kernel@gmail.com>,
	Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] Why qemu write/rw speed is so low?
Date: Sun, 11 Sep 2011 15:32:54 +0200	[thread overview]
Message-ID: <20110911133254.GA4055@lst.de> (raw)
In-Reply-To: <4E6A1CD7.70300@redhat.com>

On Fri, Sep 09, 2011 at 04:04:07PM +0200, Kevin Wolf wrote:
> > need to read in the existing 4 KB, modify the 512 bytes in place, and
> > write out the 4 KB block again.  This is read-modify-write.  In this
> > worst-case scenario a 512 byte write turns into a 4 KB read followed
> > by a 4 KB write.
> 
> But that should only happen with a 4k sector size, otherwise there's no
> reason for RMW.

The might not be a need for RMW, but if you're doing 512 byte writes to a
sparse file on 4k filesystem that filesystem will have to serialize the
I/O to prevent races from happening during block allocation.

  parent reply	other threads:[~2011-09-11 13:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09  9:44 [Qemu-devel] Why qemu write/rw speed is so low? Zhi Yong Wu
2011-09-09 10:38 ` Stefan Hajnoczi
2011-09-09 13:48   ` Zhi Yong Wu
2011-09-09 13:54     ` Stefan Hajnoczi
2011-09-09 14:04       ` Kevin Wolf
2011-09-09 15:27         ` Stefan Hajnoczi
2011-09-11 13:32         ` Christoph Hellwig [this message]
2011-09-09 14:09       ` Zhi Yong Wu
2011-09-13  2:38   ` Zhi Yong Wu
2011-09-13  2:52     ` Zhi Yong Wu
2011-09-13  7:14       ` Stefan Hajnoczi
2011-09-13  9:25         ` Zhi Yong Wu
2011-09-13 10:14           ` Stefan Hajnoczi
2011-09-13 10:27             ` Zhi Yong Wu
2011-09-14  2:42             ` Zhi Yong Wu
2011-09-14 14:17               ` Stefan Hajnoczi
2011-09-15  9:04                 ` Zhi Yong Wu
2011-09-13  7:15     ` Stefan Hajnoczi
2011-09-13  8:31       ` Zhi Yong Wu
2011-09-13  8:49         ` Stefan Hajnoczi
2011-09-13  8:54           ` Zhi Yong Wu

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=20110911133254.GA4055@lst.de \
    --to=hch@lst.de \
    --cc=aliguro@us.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=wuzhy@linux.vnet.ibm.com \
    --cc=zwu.kernel@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.