Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4166859imm; Mon, 14 May 2018 03:42:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp8hPOQ0JfjulJcHK6F1nirR60V9iB16fZTz/beHJlZLxSpBeczR1D7IgKvGKJSoGTTjHXl X-Received: by 2002:a65:550d:: with SMTP id f13-v6mr8138952pgr.324.1526294542352; Mon, 14 May 2018 03:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526294542; cv=none; d=google.com; s=arc-20160816; b=gWwywtjnCZpmlbGA5TQjlNSymUbWwatdT3N1ZmGhZ8je4GmbcCiBBXczpH4OyQWOw6 A69ky8rfKMZ9nv6d3jssO4j0iCR3TY6pmCOTV8ZbmkkjCJ7MIe73wqGubGaxFcY16NN/ OK5/HfdBjUjDpbRIpP6piepUQQGcaU6pPpf6nNlWWHi6mlDo2gOzxl87FWDKj8fHUVw2 FJllKS3vUgoYhS9p1sBeUAyBW0wDjygoi7Ih3ZODnlwcXFR+2EvmoXF0sG2zjhi9nftE tnQq8AUWj1kAXXMwKR2LObDzJhP1fXXo4AQJljuL43dJGUuNCk/raMNTXDsUpIntNzMy QSLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :references:cc:to:from:subject:arc-authentication-results; bh=+ujSkefZCMYW1NlngPrNgOvlMtUHWphFEwEdLUPuEHo=; b=fO3OS6AbpaQDEDQG5hvRKHet4fcr3G5XWnbSSYoAUPJw4Jc7wPWav5XYSZnpDHUzrd 82yQZDjPt1yBaI9rFMx2jAMKybHO6mFJWvl57cd7oVEoBJzR4MSO8zG8uAuDtFnyKSfi l1RjJez1VERwVH7jrVXlzFaElytnNxgBad/yidMU9BQ99TfHjwty6ujvckl+HxE29c5B rAyxPyfZdR4c+DcCs1+nd5aSQ4Vck9NgyEe9XWu2XKEHgbd4ndaiIYR1ZhCAIcwh1jqE +Qn4G0UdLY4+UVSfuTzzZm4YH2IXrWLBj5zj430bKZWCbCF6OfzvlKaZKl0QUR3+lnUl J7jg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u123-v6si8613701pfu.322.2018.05.14.03.42.08; Mon, 14 May 2018 03:42:22 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752089AbeENKlk (ORCPT + 99 others); Mon, 14 May 2018 06:41:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48450 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751780AbeENKli (ORCPT ); Mon, 14 May 2018 06:41:38 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4EAdIbi095450 for ; Mon, 14 May 2018 06:41:37 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hy731mr8h-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 14 May 2018 06:41:37 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 May 2018 06:41:36 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 14 May 2018 06:41:32 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4EAfVi657147514; Mon, 14 May 2018 10:41:31 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5A8FFAC03F; Mon, 14 May 2018 06:43:04 -0400 (EDT) Received: from [9.77.212.87] (unknown [9.77.212.87]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 022C1AC041; Mon, 14 May 2018 06:42:59 -0400 (EDT) Subject: Re: [PATCH v3 1/2] tpm: reduce poll sleep time in tpm_transmit() From: Nayna Jain To: J Freyensee , linux-integrity@vger.kernel.org Cc: zohar@linux.vnet.ibm.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, jarkko.sakkinen@linux.intel.com, tpmdd@selhorst.net, jgunthorpe@obsidianresearch.com, patrickc@us.ibm.com References: <20180507160733.8817-1-nayna@linux.vnet.ibm.com> <20180507160733.8817-2-nayna@linux.vnet.ibm.com> <107cd9f7-69a3-dbb8-1a61-541172832a0c@linux.vnet.ibm.com> Date: Mon, 14 May 2018 16:09:41 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <107cd9f7-69a3-dbb8-1a61-541172832a0c@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18051410-0052-0000-0000-000002EE31BC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009023; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000260; SDB=6.01032126; UDB=6.00527630; IPR=6.00811258; MB=3.00021102; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-14 10:41:34 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051410-0053-0000-0000-00005CAD9BD7 Message-Id: <4896f0b6-70b7-77ad-1b33-f13890b6fec2@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-14_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805140111 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/10/2018 06:11 PM, Nayna Jain wrote: > > > On 05/08/2018 10:04 PM, J Freyensee wrote: >> >>>           do { >>> -            tpm_msleep(TPM_POLL_SLEEP); >>> +            tpm_msleep(TPM_TIMEOUT_POLL); >>> >> I'm just curious why it was decided to still use tpm_msleep() here >> instead of usleep_range() which was used in the 2nd patch. > > TPM_TIMEOUT_POLL is in msec i.e. 1 msec and usleep_range() is used > only when timeout is needed in usecs. Just to add bit more details: usleep_range() is used in wait_for_tpm_stat() and get_burstcount() which are expected to return quickly. tpm_transmit() is a generic function used across all drivers and commands. Some of the commands (eg. hash, key generation) take longer compared to other commands (eg. extend). The sleep time in tpm_transmit is reduced but kept in msecs to balance between the smaller and longer commands. Thanks & Regards,     - Nayna > >> >> Otherwise, >> >> Acked-by: Jay Freyensee > > Thanks !! > > Thanks & Regards, >     - Nayna > >