From: Anthony Liguori Subject: Re: [Qemu-devel] [PATCH 5/7] xen: add block device backend driver. Date: Mon, 04 Aug 2008 12:46:14 -0500 Message-ID: <48974066.1090803@codemonkey.ws> References: <1217865045-10722-1-git-send-email-kraxel@redhat.com> <1217865045-10722-6-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com, Gerd Hoffmann List-Id: xen-devel@lists.xenproject.org Blue Swirl wrote: > On 8/4/08, Gerd Hoffmann wrote: > >> +/* i386 protocol version */ >> +#pragma pack(push, 4) >> > > What's wrong with __attribute__(__aligned__)? > > >> + * FIXME: the code is designed to handle multiple outstanding >> + * requests (using aio or using threads), which isn't used right >> + * now due to limitations of the qemu block driver interface. >> > > Yes, what happened to vectored DMA patches? > Believe it or not, they were hurting performance in KVM. Passing a vector to the block layer will force the IO operation to be split up into multiple requests that are all executed in serial (since QEMU only supports 1 outstanding request at a time). Copying the vectored IO to a linear buffer increased performance significantly because it avoided this serialization. The block layer needs some refactoring to support proper vectored AIO operations before a zero-copy API will make sense from a performance perspective. Regards, Anthony Liguori