Received: by 10.223.185.116 with SMTP id b49csp7780223wrg; Thu, 1 Mar 2018 10:58:48 -0800 (PST) X-Google-Smtp-Source: AG47ELumkAjabhAjbAIeKch1sNTXPg85UIatvbXAFyc+EUXYi7/F1vTQB5sNoSb/S4BeWv1KN+0O X-Received: by 10.98.242.65 with SMTP id y1mr2888073pfl.232.1519930728107; Thu, 01 Mar 2018 10:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519930728; cv=none; d=google.com; s=arc-20160816; b=tQHP16MG3KdIaWw1Foc9iS9a6MK0mOihVRrBboHgnSCGw1mWzp8wRRgVbn1bqTcIa7 6YT/wpoadz20MeVuOY945AO3M1rrBxva0s4gF8PKRm6/QBz5ZJjp6oJP/8yknhv7bzgQ 3j44CcMlURSzLDebkcDHX8gdOb3C6nXJr9IW2Fj4bc3FD0fqoTFqzBoblOzrlQXwZpra w5K+CrlKr156fJY0ooC9Wiy+rrdXmTiDNTkgoGIjlAls5TxoN5wI/oTb2qR3bGGm3Aad sf+EoVAK9TUDgQA/rRS6gd1G7nOQn5XkVtNF4Q5XUuWB0xgLUGuvRmSSP0to3OL/Yvyp OUwA== 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 :from:references:cc:to:subject:arc-authentication-results; bh=Gh8GM/fMXVEfYMcwe12ei2eD/1fvl5LNfgi2jWT5CSw=; b=D3R2vCI1blKenPJYpFKk5lKk7Qlzdyx8oR44LEOZow6bGEKOmw1Ys73RxPICqGxfJX XO8qaqeFxF1devNjFHL4kRQhTnJyo/x5seNy9nKVYBn20r71cvRenTUWluhE1MKCSLzE /TfxMLRdKSJP/MtnLGGPZq3S94NvJ5rR8C8dyee8A50Qko8bArQaVWr/sMp6Rbsk8Qav txqbUyepk5XUnocZjQYWRzywhwp4SJRdnArKMDXr6A6Jlx+YIYIivQt74lpRGNM3MwC0 xwhD5ii3hDjGnrzDVOxg0Qg6BJFBxq64N38sa4qmErihtiK6K01hHocTh3Iz8TK3UPT4 LFZw== 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 l5-v6si3549687plk.390.2018.03.01.10.58.32; Thu, 01 Mar 2018 10:58:48 -0800 (PST) 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 S1161095AbeCAS5x (ORCPT + 99 others); Thu, 1 Mar 2018 13:57:53 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58568 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034092AbeCAS5u (ORCPT ); Thu, 1 Mar 2018 13:57:50 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w21IuS0r049832 for ; Thu, 1 Mar 2018 13:57:50 -0500 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0a-001b2d01.pphosted.com with ESMTP id 2genbwmuj8-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 01 Mar 2018 13:57:49 -0500 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 1 Mar 2018 13:57:48 -0500 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 1 Mar 2018 13:57:45 -0500 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w21IviGj41746552; Thu, 1 Mar 2018 18:57:44 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2959DAE043; Thu, 1 Mar 2018 13:59:08 -0500 (EST) Received: from [9.195.41.75] (unknown [9.195.41.75]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id 202CAAE034; Thu, 1 Mar 2018 13:59:04 -0500 (EST) Subject: Re: [PATCH 2/3] tpm: reduce poll sleep time between send() and recv() in tpm_transmit() To: Jarkko Sakkinen 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 References: <20180228191828.20056-1-nayna@linux.vnet.ibm.com> <20180228191828.20056-2-nayna@linux.vnet.ibm.com> <20180301092222.GC29420@linux.intel.com> From: Nayna Jain Date: Fri, 2 Mar 2018 00:26:35 +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: <20180301092222.GC29420@linux.intel.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: 18030118-0056-0000-0000-00000426C582 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008609; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.00996910; UDB=6.00506857; IPR=6.00776227; MB=3.00019805; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-01 18:57:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030118-0057-0000-0000-00000868C68A Message-Id: <6ef601be-5627-6746-bd4a-4f391aba8b04@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-01_10:,, 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-1803010233 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/01/2018 02:52 PM, Jarkko Sakkinen wrote: > On Wed, Feb 28, 2018 at 02:18:27PM -0500, Nayna Jain wrote: >> In tpm_transmit, after send(), the code checks for status in a loop > Maybe cutting hairs now but please just use the actual function name > instead of send(). Just makes the commit log more useful asset. Sure, will do. > >> - tpm_msleep(TPM_TIMEOUT); >> + tpm_msleep(TPM_TIMEOUT_POLL); > What about just calling schedule()? I'm not sure what you mean by "schedule()".  Are you suggesting instead of using usleep_range(),  using something with an even finer grain construct? Thanks & Regards,      - Nayna > > /Jarkko >