From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GjGMq-0003Gl-4W for qemu-devel@nongnu.org; Sun, 12 Nov 2006 09:31:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GjGMp-0003Fq-31 for qemu-devel@nongnu.org; Sun, 12 Nov 2006 09:31:27 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjGMp-0003Fn-03 for qemu-devel@nongnu.org; Sun, 12 Nov 2006 09:31:27 -0500 Received: from [193.7.176.60] (helo=mail.bawue.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GjGMo-00035U-Pz for qemu-devel@nongnu.org; Sun, 12 Nov 2006 09:31:27 -0500 Received: from lagash (88-106-179-150.dynamic.dsl.as9105.com [88.106.179.150]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bawue.net (Postfix) with ESMTP id AC1ACB84F3 for ; Sun, 12 Nov 2006 15:30:23 +0100 (CET) Received: from ths by lagash with local (Exim 4.63) (envelope-from ) id 1GjGL4-0005qv-RQ for qemu-devel@nongnu.org; Sun, 12 Nov 2006 14:29:38 +0000 Date: Sun, 12 Nov 2006 14:29:38 +0000 Subject: Re: [Qemu-devel] [PATCH] Huge TLB performance improvement Message-ID: <20061112142938.GC4040@networkno.de> References: <20060306145929.GD27785@networkno.de> <20061112011035.GB21771@nevyn.them.org> <45570A32.3030608@wanadoo.fr> <200611121408.09895.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <200611121408.09895.paul@codesourcery.com> From: Thiemo Seufer Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Paul Brook wrote: > On Sunday 12 November 2006 11:49, Laurent Desnogues wrote: > > Daniel Jacobowitz a =E9crit : > > > Straight qemu with my previously posted MIPS patches takes 6:13 to > > > start and reboot a MIPS userspace (through init, so lots of fork/exec= ). > > > > > > Thiemo's patch, which flushes the whole jump buffer, cuts it to 1:40. > > > > > > A patch which finds the entries which need to be flushed more > > > efficiently cuts it to 1:21. > > > > > > A patch which flushes up to 1/32nd of the jump buffer indiscriminately > > > cuts it to 1:11-1:13. > > > > Warning: I don't know anything about the Qemu MMU implementation > > so this question is perhaps stupid :) > > > > Did you try to benchmark some user space applications with the > > various implementations you propose? The boot of a Linux kernel > > is quite heavy on various kinds of flushes and so is very > > different from "standard" applications. >=20 > MIPS is different because it has a relatively small software managed TLB.= =20 JFTR, increasing the TLB size from 16 to 64 entries made no performance difference whatsoever. > Other targets have a hardware managed TLB. On a hardware managed TLB the = OS=20 > treats it as if it were infinite size, and invalidation only occurs when = a OS=20 > changes the mappings. On a software managed TLB "flushes" are more likely= to=20 > occur during normal operation as TLB slots are reused. The excessive flushing for mips happens because Qemu doesn't properly model the hardware's ASID handling. Thiemo