From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0GPK-0002kI-2i for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:55:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0GPI-0008Mm-U3 for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:55:13 -0500 Received: from e38.co.us.ibm.com ([32.97.110.159]:45823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0GPI-0008Mh-NB for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:55:12 -0500 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Feb 2012 10:55:11 -0700 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 8197AC9004D for ; Wed, 22 Feb 2012 12:55:07 -0500 (EST) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q1MHt7FB275878 for ; Wed, 22 Feb 2012 12:55:07 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q1MHt7ox032512 for ; Wed, 22 Feb 2012 15:55:07 -0200 Message-ID: <4F452BFA.1050903@linux.vnet.ibm.com> Date: Wed, 22 Feb 2012 12:55:06 -0500 From: Stefan Berger MIME-Version: 1.0 References: <1323870202-25742-1-git-send-email-stefanb@linux.vnet.ibm.com> <1323870202-25742-3-git-send-email-stefanb@linux.vnet.ibm.com> <20120220220201.GD19278@redhat.com> <4F42E899.3010907@linux.vnet.ibm.com> <20120221031854.GA2502@redhat.com> <4F437DBE.90901@linux.vnet.ibm.com> <20120221121810.GA6975@redhat.com> <4F43B2B6.1040109@linux.vnet.ibm.com> <20120221195812.GB9062@redhat.com> <4F441B08.6000306@linux.vnet.ibm.com> <20120221230845.GD9062@redhat.com> In-Reply-To: <20120221230845.GD9062@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V14 2/7] Add TPM (frontend) hardware interface (TPM TIS) to Qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, andreas.niederl@iaik.tugraz.at On 02/21/2012 06:08 PM, Michael S. Tsirkin wrote: > On Tue, Feb 21, 2012 at 05:30:32PM -0500, Stefan Berger wrote: >> On 02/21/2012 02:58 PM, Michael S. Tsirkin wrote: > > Worst case, you can take a qemu mutex. Is tpm very > performance-sensitive to make contention on that > lock a problem? > FYI: Some performance measurements with the libtpms backend and linux 3.3.0-rc3 with IMA enabled. IMA takes ~1324 measurements while booting and sends TPM_Extend()s. I implemented a 'fast-path' for TPM ordinals that are considered 'short' in terms of duration of execution and where this TPM_Extend operation is one of them. In this case the Qemu main thread enters the TPM code rather than using the thread. Here are the measurements with the 1st one taken when dmesg states 'mtrr: no MTRR for fc000..' and the 2nd one 'eth0: no IPv6 routers present'. Both may not be a great way to measure but at least show some 'trends': average percentage no IMA 14.17 / 21.93 14.28 / 21.24 12.83 / 20.18 13.76 / 21.12 100 / 100 w/ fast path + IRQ: 15.50 / 22.72 14.58 / 21.41 15.30 / 22.37 15.12 / 22.17 110 / 105 w/ fast path + poll: 16.17 / 22.96 14.67 / 21.66 14.43 / 22.17 15.09 / 22.26 110 / 105 no fast path + IRQ: 16.93 / 23.51 13.94 / 20.72 16.39 / 23.48 15.75 / 22.57 114 / 107 no fast path + poll: 17.03 / 23.95 18.11 / 25.38 16.67 / 24.08 17.27 / 24.47 126 / 119 Stefan