From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpcOf-0003cK-8b for qemu-devel@nongnu.org; Sun, 08 Dec 2013 06:19:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VpcOX-0000qJ-Vg for qemu-devel@nongnu.org; Sun, 08 Dec 2013 06:19:37 -0500 Received: from mail-ea0-f169.google.com ([209.85.215.169]:40607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpcOX-0000q6-Pe for qemu-devel@nongnu.org; Sun, 08 Dec 2013 06:19:29 -0500 Received: by mail-ea0-f169.google.com with SMTP id l9so1053280eaj.0 for ; Sun, 08 Dec 2013 03:19:28 -0800 (PST) Message-ID: <52A455BE.5090602@cloudius-systems.com> Date: Sun, 08 Dec 2013 13:19:26 +0200 From: Avi Kivity MIME-Version: 1.0 References: <5296A674.2080406@twiddle.net> In-Reply-To: <5296A674.2080406@twiddle.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] outlined TLB lookup on x86 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , Xin Tong , qemu-devel@nongnu.org On 11/28/2013 04:12 AM, Richard Henderson wrote: >> 2. why not use a TLB or bigger size? currently the TLB has 1<<8 entries. the >> TLB lookup is 10 x86 instructions , but every miss needs ~450 instructions, i >> measured this using Intel PIN. so even the miss rate is low (say 3%) the >> overall time spent in the cpu_x86_handle_mmu_fault is still signifcant. > I'd be interested to experiment with different TLB sizes, to see what effect > that has on performance. But I suspect that lack of TLB contexts mean that we > wind up flushing the TLB more often than real hardware does, and therefore a > larger TLB merely takes longer to flush. > You could use a generation counter to flush the TLB in O(1) by incrementing the counter. That slows down the fast path though. Maybe you can do that for the larger second level TLB only.