From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: [PATCH] Use qemu_memalign instead of qemu_malloc Date: Wed, 25 Jun 2008 11:19:39 +0200 Message-ID: <48620DAB.5010501@suse.de> References: <1214333395-4094-1-git-send-email-aliguori@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from cantor2.suse.de ([195.135.220.15]:48013 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751768AbYFYJWe (ORCPT ); Wed, 25 Jun 2008 05:22:34 -0400 In-Reply-To: <1214333395-4094-1-git-send-email-aliguori@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori schrieb: > I guess the main block code is not as defensive as I thought it was. This patch > uses qemu_memalign to allocate the buffers for IO so that you don't get errors > when using O_DIRECT. Actually, the block code should be able to deal with unaligned buffers since qemu rev. 4599. This change seems to be present in current KVM. Can you tell exactly which operation failed? But apart from that, qemu_memalign is the right thing to do, because copying from/into an aligned buffer in the block code costs performance (don't know how much, though). Kevin