|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] buffer alignment for block backends |
Date: | Thu, 09 Apr 2009 08:14:28 -0500 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
Stefano Stabellini wrote:
Anthony Liguori wrote:This is fine, but this is purely an optimization, it cannot be relied upon in the general case.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);If you are OK with this, a simple patch like the following is acceptable, or do you prefer a more formal approach involving a new function in the BlockDriver interface?
Yes, but that's not covering very many of the cases. There are still places where we allocate bounce buffers that aren't with memalign (like in block-qcow2.c). Also, please document what the new function does and when it should be used.
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |