Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4172218imm; Mon, 14 May 2018 03:48:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr0xYA0YA+Loou2py0Ms5ed6z4n47g/H1nF6F4afCw7Nxfr3tASSIQVO3Nawcpm+gPVXSec X-Received: by 2002:a17:902:82ca:: with SMTP id u10-v6mr9385223plz.160.1526294892186; Mon, 14 May 2018 03:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526294892; cv=none; d=google.com; s=arc-20160816; b=gpEtpAdJ9eSpdpLjLHlhOBlxnWVtJZddvGkaunRaBq+WC3vFMrlNPBdc5UjAcNBd1h axprKA+rI6Oh0lNMy9rBdSKjGuX19oE8F7s04wjSvhjchQcS8oi3gWkiPvE6qBI1zQhS McEP9EwmTgsNSlS7NoWvm1ooXHRruZGAlVQuO3rvDhae/4ygQ7vOoI85prLeEs1YuiH6 fUUbM1l7j1CQbD9P2ITV686BPXOU/hRijBPQiy47Hb7JIPYARnxz4L3nU86buiO59c/4 9xMTGSPW5YY3LRp/0QWu2b+YA4BI6wuq0oNKTedlfhpx2T8221X3D+Y3u1ThfNB9YOHP kGeg== 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=vFCAoiO4zfRuqYSmvEIZf3rK3FMIrfyLJ3WgBc0MQP0=; b=h/cjY0fHh1H9euOI7nXHDmgE/W+/57Nsr2jBnQ7WjLwzOG0BJOtccYdwBa7TfZez+p e0QD6NFC1YDnVtC+zQZXigi8aMCXveLRMAezP1i7hxfAyMb4PwTMoqi/Kr+/LUgIMnvj KuMZsIJvVS90YclOJADOUp3jJD+U/QWfN+LY7I97W5a6v+WIn8N99BonkTuoOPZCdkGs TGUYV52/wOvZ5BTvMULTcRPzlLp7ukUaBNm1FtFgFdDhoT1y+BsNATet4X6UcUOprheP 22Qz5oR91Paf7b/yGavXCGR5cZtP+dJRpS4eEUbmWnWroMD3+D6b87+TTl3DOpnxhAW5 5VGw== 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 i14-v6si7365085pgv.424.2018.05.14.03.47.57; Mon, 14 May 2018 03:48:12 -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 S1752155AbeENKqJ (ORCPT + 99 others); Mon, 14 May 2018 06:46:09 -0400 Received: from mga17.intel.com ([192.55.52.151]:35325 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbeENKqI (ORCPT ); Mon, 14 May 2018 06:46:08 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 03:46:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,399,1520924400"; d="scan'208";a="54985069" Received: from yixuanma-mobl.ccr.corp.intel.com (HELO localhost) ([10.249.254.136]) by fmsmga001.fm.intel.com with ESMTP; 14 May 2018 03:46:02 -0700 Date: Mon, 14 May 2018 13:46:00 +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: <20180514104600.GC8228@linux.intel.com> References: <20180507160733.8817-1-nayna@linux.vnet.ibm.com> <20180507160733.8817-2-nayna@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180507160733.8817-2-nayna@linux.vnet.ibm.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 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 /Jarkko