From: Christoph Hellwig <hch@lst.de>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/5] use qemu_blockalign consistently
Date: Tue, 14 Sep 2010 18:09:38 +0200 [thread overview]
Message-ID: <20100914160938.GA28027@lst.de> (raw)
In-Reply-To: <AANLkTinKZH74fbQxykRytcx4OVSgOkNGSmw1A5h=se-Q@mail.gmail.com>
On Mon, Sep 13, 2010 at 08:02:28PM +0100, Stefan Hajnoczi wrote:
> On Sun, Sep 12, 2010 at 10:42 PM, Christoph Hellwig <hch@lst.de> wrote:
> > Use qemu_blockalign for all allocations in the block layer. ?This allows
> > increasing the required alignment, which is need to support O_DIRECT on
> > devices with large block sizes.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> I noticed that the backing file may have different alignment
> requirements than the image file but qemu_blockalign() currently only
> takes into account the image file's requirements. Not necessarily
> something for this patch, but since you're in the area I wanted to
> mention it.
>
> It seems safe to take the max alignment (they should both be powers of
> two I think) of the image and backing files.
Currently we check the required alignment based on the blocksize we
present to the guest, which is set by the driver. That's a bit upside
down, but the best we can do. The problem is that the blocksize of the
device the image (and it's backing file reside on) are the lower bound
of what we can support in the guest without massive read/modify/write
cycles. If we use the page cache the kernel does the cycles for us,
but for cache=none we would have to do it ourselves in a rather
inefficient way.
prev parent reply other threads:[~2010-09-14 16:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 21:42 [Qemu-devel] [PATCH 1/5] use qemu_blockalign consistently Christoph Hellwig
2010-09-12 21:43 ` [Qemu-devel] [PATCH 2/5] raw-posix: handle > 512 byte alignment correctly Christoph Hellwig
2010-09-12 21:43 ` [Qemu-devel] [PATCH 3/5] virtio-blk: propagate the required alignment Christoph Hellwig
2010-09-12 21:43 ` [Qemu-devel] [PATCH 4/5] scsi-disk: " Christoph Hellwig
2010-09-12 21:44 ` [Qemu-devel] [PATCH 5/5] ide: " Christoph Hellwig
2010-09-21 10:59 ` Kevin Wolf
2010-09-13 19:02 ` [Qemu-devel] [PATCH 1/5] use qemu_blockalign consistently Stefan Hajnoczi
2010-09-14 16:09 ` Christoph Hellwig [this message]
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=20100914160938.GA28027@lst.de \
--to=hch@lst.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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 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).