|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] buffer alignment for block backends |
Date: | Thu, 09 Apr 2009 10:56:27 -0500 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
Samuel Thibault wrote:
Anthony Liguori, le Thu 09 Apr 2009 08:11:27 -0500, a écrit :This buffer is only used when not doing DMA. When doing DMA, we are able to do zero-copy IO so the alignment of the request depends on how the guest aligned the request. I suspect you'll find a lot of guests that, in practice, do not align requests at 4k boundaries.- ide.c:ide_init2Eeeeerrr, why shoudn't they? Guests usually work on pages, which are already aligned on 4k boundaries.
Like if you do a 512-byte O_DIRECT write (in userspace) to a 512-byte, but not 4096-byte aligned buffer in Linux. This may not happen all the time, but if you don't handle this in your backend, you'll get a lot of lovely bug reports :-)
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |