Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4174688imm; Mon, 14 May 2018 03:50:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqkdC2BwkVr47Lp8BgxHpnrwMG0g7n4IcJn60H7QGKnOqcL3sfS2or4DpPx/JHMEjTU22+k X-Received: by 2002:a63:b203:: with SMTP id x3-v6mr7983097pge.266.1526295053798; Mon, 14 May 2018 03:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526295053; cv=none; d=google.com; s=arc-20160816; b=lQVd7ogfc+K2838G3Vd/AE6fvYhwU1v3FF1GJE8u4tA8eZxqymoCgyXXWxI6qOFQi4 zBPy7jnKt2rDWZIi9dCR2dcUrpAPyjGbSxFSRt2ORUTjOBf8uWwj+q9yDTuAVpOjGSkt 6WT4ZQW8cmXS379ZdEuuzPvpNFVo5xiBUC3EI0vNbh4Rdb7v2zQbjw4IGZXXlUMpsZ+T r6cc+9cBlUC7iH5pvub8RibOa624GC+MXZBstz84nk47IZBUakAbmUVwoMAZ0UCC5mdC SLb7pBxL4quqDWbAIrXGvSkVQP66pv7TGF4kr30v/s3hU5VRamrhQsCyeUFtjyDxxsHL vcJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=d5BsRIOsPSWxKhs7IEyO38q9gK2cT+sfImDKL/1brXI=; b=PrM+yJ+/kAYJEUw8LEz9cZH+ceNh5h2rIkr5SsTBw6mog1vpg+xhGlQZ8jb/dBLmcm m/LvpGDQcL4hPcckwZDxatxGJ3NAOV7pkPGja0iX/uutaVDDhOP6cbCZ8pjao22Av/k6 SYe668zlY5hG6XNn/U+Gjj/KqQ/VjcwmJSH5Mep7LvslTUusEH2wKXMaCTiXDdi1aL7K F/EnIWhVxR5UnXnHJ0PvhuOK4eN6jfn2vtUt1AVaGZaAr02zbqlhbcykSqFKqS7madM7 NI8kQnW4Ocqag2VlmFQ7RGm/5eUAu3P8wnFM3nOBe23dH/k2NvvXJViiA+WiISL2JSNr zf9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y13-v6si7632638pgr.654.2018.05.14.03.50.39; Mon, 14 May 2018 03:50:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbeENKrJ (ORCPT + 99 others); Mon, 14 May 2018 06:47:09 -0400 Received: from mga12.intel.com ([192.55.52.136]:10266 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752011AbeENKrI (ORCPT ); Mon, 14 May 2018 06:47:08 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 03:47:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,399,1520924400"; d="scan'208";a="228347569" Received: from yixuanma-mobl.ccr.corp.intel.com (HELO localhost) ([10.249.254.136]) by fmsmga006.fm.intel.com with ESMTP; 14 May 2018 03:47:02 -0700 Date: Mon, 14 May 2018 13:47:01 +0300 From: Jarkko Sakkinen To: Nayna Jain Cc: linux-integrity@vger.kernel.org, zohar@linux.vnet.ibm.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, tpmdd@selhorst.net, jgunthorpe@obsidianresearch.com, patrickc@us.ibm.com Subject: Re: [PATCH v3 1/2] tpm: reduce poll sleep time in tpm_transmit() Message-ID: <20180514104701.GD8228@linux.intel.com> References: <20180507160733.8817-1-nayna@linux.vnet.ibm.com> <20180507160733.8817-2-nayna@linux.vnet.ibm.com> <20180514104600.GC8228@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180514104600.GC8228@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 01:46:00PM +0300, Jarkko Sakkinen wrote: > On Mon, May 07, 2018 at 12:07:32PM -0400, Nayna Jain wrote: > > tpm_try_transmit currently checks TPM status every 5 msecs between > > send and recv. It does so in a loop for the maximum timeout as defined > > in the TPM Interface Specification. However, the TPM may return before > > 5 msecs. Thus the polling interval for each iteration can be reduced, > > which improves overall performance. This patch changes the polling sleep > > time from 5 msecs to 1 msec. > > > > Additionally, this patch renames TPM_POLL_SLEEP to TPM_TIMEOUT_POLL and > > moves it to tpm.h as an enum value. > > > > After this change, performance on a system[1] with a TPM 1.2 with an 8 byte > > burstcount for 1000 extends improved from ~14 sec to ~10.7 sec. > > > > [1] All tests are performed on an x86 based, locked down, single purpose > > closed system. It has Infineon TPM 1.2 using LPC Bus. > > > > Signed-off-by: Nayna Jain > > Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen /Jarkko