[Top][All Lists]

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

Re: [Qemu-devel] buffer alignment for block backends

From: Christoph Hellwig
Subject: Re: [Qemu-devel] buffer alignment for block backends
Date: Thu, 9 Apr 2009 17:31:12 +0200
User-agent: Mutt/1.3.28i

On Thu, Apr 09, 2009 at 02:30:42PM +0100, Stefano Stabellini wrote:
> Christoph Hellwig wrote:
> > On Thu, Apr 09, 2009 at 11:07:28AM +0100, Stefano Stabellini wrote:
> >> +    acb->bounce = qemu_blockalign(qiov->size);
> > 
> > Why don't you pass a BlockDriverState to it so that it automatically
> > does the best alignment for the underlying driver?
> > 
> This is a good idea.
> What if I add a new field to BlockDriverState called 'alignment'
> defaulted to 512?

Let's call it buffer_alignmnet or memory_alignment as we also have an
alignment of the actual sector number (doesn't matter currently, but
there are devices or device configurations that only support larger than
512 byte sectors)

Also please add a large comment describing what it's used for.  Right
now that's only a hint for the allocations, but I might re-use it in
future to move the bouncing on mis-alignmnet into the block layer.

reply via email to

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