qemu-devel
[Top][All Lists]
Advanced

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

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


From: Stefano Stabellini
Subject: Re: [Qemu-devel] buffer alignment for block backends
Date: Thu, 09 Apr 2009 10:57:03 +0100
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

Anthony Liguori wrote:

>> If you do not want to do that, another possible solution is to create a
>> new function called "qemu_blockalign" that would be implemented as
>> qemu_memalign(512, size);
> 
> This is fine, but this is purely an optimization, it cannot be relied 
> upon in the general case.



well, there aren't many places that allocate buffers for the block
backends, I can count only the following for dma operations:

- block.c:bdrv_aio_rw_vector

and this one for other ide read and write operations:

- ide.c:ide_init2

I think it would be important at least for dma operations.


>>  so we don't have to write 512 bytes everywhere
>> but only in one place, thus making life easier to people like me that
>> have to change the value for a special case.
>>
>> Thanks in advance for your sympathy :)
>>   
> 
> Why does your backend requirement page alignment and who's notion of page?
> 

my backend (block-vbd) needs page aligned buffers because blkfront needs
page aligned buffers. I could allocate a new page aligned buffer every
time and the memcpy but it is just a waste.

The notion of page is the host notion of page (minios in this case).




reply via email to

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