From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CgVK5-0001Qo-0X for qemu-devel@nongnu.org; Mon, 20 Dec 2004 16:44:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CgVK1-0001NR-Mr for qemu-devel@nongnu.org; Mon, 20 Dec 2004 16:44:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CgVK1-0001ME-Hb for qemu-devel@nongnu.org; Mon, 20 Dec 2004 16:44:05 -0500 Received: from [64.233.184.195] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CgV7w-0006T6-Jv for qemu-devel@nongnu.org; Mon, 20 Dec 2004 16:31:36 -0500 Received: by wproxy.gmail.com with SMTP id 68so633444wri for ; Mon, 20 Dec 2004 13:31:34 -0800 (PST) Message-ID: Date: Mon, 20 Dec 2004 22:31:34 +0100 From: Piotras In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: Subject: [Qemu-devel] Re: [PATCH] CONFIG_MMU_MAP powerpc host support Reply-To: Piotras , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Magnus Damm , qemu-devel@nongnu.org Great! Do you have an estimate of possible performance gain by introducing direct pointer to mmu_map for memory read? I have two ideas for future experimentation. There is a trick possible without wasting another register for global variable: use two copies of CPUState (one for privileged and another for user mode), then make mmu_map.add_read first member of the struct. This would introduce guest register coping for user/supervisor switch, but maybe performance gain would justify this. Another idea: if we could align add_read/add_write on 64k boundary, "addi" could be removed. Regards, Piotrek On Mon, 20 Dec 2004 18:55:21 +0100, Magnus Damm wrote: > Hello, > > This patch adds powerpc host support to the CONFIG_MMU_MAP patch > written by Piotrek. My patch should be applied on top of > v1-part[1-3].patch.gz. I have only tested the code with a x86 guest on > a ppc host running Linux - someone, please test on a host running OSX. > > Performance gain reported by nbench: > > Memory index: 50% > Integer index: 44% > Fp index: 4% > > Right now each map-memory access consists of 5-6 powerpc instructions. > If a direct pointer to mem_map could be kept in a register then we > would be down to 3-4 instructions per memoy access... > > / magnus