qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/5] use qemu_blockalign consistently


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [PATCH 1/5] use qemu_blockalign consistently
Date: Tue, 14 Sep 2010 18:09:38 +0200
User-agent: Mutt/1.3.28i

On Mon, Sep 13, 2010 at 08:02:28PM +0100, Stefan Hajnoczi wrote:
> On Sun, Sep 12, 2010 at 10:42 PM, Christoph Hellwig <address@hidden> 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 <address@hidden>
> 
> 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.



reply via email to

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