From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RE5dE-0004u8-BP for qemu-devel@nongnu.org; Wed, 12 Oct 2011 16:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RE5dD-0007VX-2l for qemu-devel@nongnu.org; Wed, 12 Oct 2011 16:42:28 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:50862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RE5dC-0007VM-UP for qemu-devel@nongnu.org; Wed, 12 Oct 2011 16:42:27 -0400 Message-ID: <4E95FB7F.2010303@weilnetz.de> Date: Wed, 12 Oct 2011 22:41:35 +0200 From: Stefan Weil MIME-Version: 1.0 References: <4E95D6F1.4070402@weilnetz.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] 2 MiB alignment in qemu_vmalloc() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Avi Kivity , QEMU Developers Am 12.10.2011 22:02, schrieb Alexander Graf: > Actually, I'd much rather prefer to keep the differences between KVM > and non-KVM low here. THP can potentially also work on TCG, so the > alignment isn't completely moot here. Though it's certainly a lot less > useful, as code isn't directly executed from there and we the rest of > the overhead is a lot higher either way (especially the softmmu one). > Either way, why does valgrind break when we enforce big alignment? That really sounds more like a valgrind bug than anything else. Memalign is there for exactly that reason, no? > > > Alex Actually, there is even a difference between KVM (x86_64) and KVM (non x86_64) in the current code: only x86_64 hosts use the 2 MiB alignment. Valgrind breaks because it has an assertion which limits the alignment. This limitation was already discussed in 2008 and still exists in latest Ubuntu and other distributions (and also in latest Valgrind SVN trunk). Therefore I don't expect that it will be fixed soon. See these bug reports, for example: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489297 http://bugs.kde.org/show_bug.cgi?id=203877 Cheers, Stefan