From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atYA4-0007fJ-KX for qemu-devel@nongnu.org; Fri, 22 Apr 2016 06:18:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atYA3-0004jk-PG for qemu-devel@nongnu.org; Fri, 22 Apr 2016 06:18:08 -0400 Received: from mail-vk0-x22c.google.com ([2607:f8b0:400c:c05::22c]:35415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atYA3-0004jg-Kp for qemu-devel@nongnu.org; Fri, 22 Apr 2016 06:18:07 -0400 Received: by mail-vk0-x22c.google.com with SMTP id t129so130123116vkg.2 for ; Fri, 22 Apr 2016 03:18:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160422101546.GB30824@cbox> References: <20160421162348.GA24178@cbox> <57192EED.2040501@suse.de> <20160422100118.GD25288@cbox> <5719F7BC.4090703@suse.de> <20160422101546.GB30824@cbox> From: Peter Maydell Date: Fri, 22 Apr 2016 11:17:47 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] Performance regression using KVM/ARM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoffer Dall Cc: Alexander Graf , "Michael S. Tsirkin" , QEMU Developers , Marc Zyngier , Paolo Bonzini On 22 April 2016 at 11:15, Christoffer Dall wrote: > Peter just pointed me to a change I remember doing for ARM, so perhaps > this fix is the right one? > > > diff --git a/util/oslib-posix.c b/util/oslib-posix.c > index d25f671..a36e734 100644 > --- a/util/oslib-posix.c > +++ b/util/oslib-posix.c > @@ -35,7 +35,7 @@ > extern int daemon(int, int); > #endif > > -#if defined(__linux__) && (defined(__x86_64__) || defined(__arm__)) > +#if defined(__linux__) && (defined(__x86_64__) || defined(__arm__)) || defined(__aarch64__) > /* Use 2 MiB alignment so transparent hugepages can be used by KVM. > Valgrind does not support alignments larger than 1 MiB, > therefore we need special code which handles running on Valgrind. */ I hadn't realised AArch64 didn't define __arm__. Your extra clause wants to be inside the parens for the ||, not outside. So was the problem just that we weren't passing 2MB as the align parameter to qemu_ram_mmap(), and if we do pass 2MB then it does the right thing ? thanks -- PMM