From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCOlN-0007dX-5q for qemu-devel@nongnu.org; Mon, 13 Jun 2016 06:06:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCOlM-0007v6-98 for qemu-devel@nongnu.org; Mon, 13 Jun 2016 06:06:33 -0400 References: <1465808915-4887-1-git-send-email-vijayak@caviumnetworks.com> <1465808915-4887-4-git-send-email-vijayak@caviumnetworks.com> <16ef20d6-8c02-8617-0b6a-16fab76d3333@redhat.com> From: Paolo Bonzini Message-ID: Date: Mon, 13 Jun 2016 12:06:20 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Vijaya Kumar K , qemu-arm , Juan Quintela , QEMU Developers , Prasun Kapoor , Vijay Kilari , Vijaya Kumar K , Vijaya Kumar K On 13/06/2016 11:36, Peter Maydell wrote: >>> /* The bottom level has pointers to PageDesc */ >>> >> -static void *l1_map[V_L1_SIZE]; >>> >> +static void *l1_map; >> > >> > You can make this array have a static V_L2_SIZE * 16 size too. Peter, >> > what do you think? > I don't know this code well enough to have an informed view, > but we only allocate this once at startup, right? I'm not sure > why making it a static array would be better? It makes accesses faster by avoiding a pointer load. On one hand it might be just microoptimization, on the other hand... death by one thousand papercuts... Paolo