Received: by 10.223.185.116 with SMTP id b49csp7204207wrg; Thu, 1 Mar 2018 01:24:46 -0800 (PST) X-Google-Smtp-Source: AG47ELudLaV01Vog2Fe9Gch2pCwHbjMYOIKY7fIn94HiJCzU5Pbd9esnG/VQotWqR6X5mLlWDH1A X-Received: by 10.99.175.8 with SMTP id w8mr991586pge.390.1519896286644; Thu, 01 Mar 2018 01:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519896286; cv=none; d=google.com; s=arc-20160816; b=UGhZnhD/Yg8zBODPTH8d0G17TFQPQaRVVuqA79JXBq2yBb7PsE8WGY414gmrFiOotr /4sypwbdG9ACOLV1Eo1TimXq95Z418OCEva1DupmKABVRELSFkbNFr+mDlJ4zsWHwdwa wHAc7mOxbJXLAWEMYnEeEdZzEzuvjs7cqUZxaoQ2xYnlfz1RJU0BYLEkrShmyQ3uiLIs S4lkZ5vfQvTh964HSF+Y2stbqIOTeVePTtT8E1wx2tLZZeGYTuEAhfAhbpvM+/ujbC3a +FzCPk+aEj3pgSyB8eiSn3BlbDcuMC5Y/UwC2ofvvjWUC7gM6YHyJFWQNcxD36pxhHaP 2Kug== 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=aLngTC43JmKS4mWoULqxDU+Coxu8IEzWk8Xk+QvWymc=; b=YIHLOkDjk3gmNJETNtPEIEY/Q+BPQSezNyUZb4MEQrZOYZKBhUO4w6izh1YcvkvRNS PT/4ZrPzM7SlClGlYk1bUUasrDXn8yAFD1JN7W5a41Xdx0MTmmaI4Kz/9/kjCZmXb9Fa e0syWvnRQ1llJkKKCUM6ilVgItCcFS6Oo2oJyZbdJPV2cGE2E90JPep42GMFHItu0oyU noXqljccQgZWCrpdelko3dDeTIwfj0POnfWuKZsAUhBHqjADkd4JiWBHP77Yk4X/IsGR ouIky7hDTkpWYQ7NtL5c0YrlpcCvXTMNWRfDzwhmNB3uSbMnI5bqUj9NhxQtI4QhkoMD giMQ== 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 u3-v6si2771933plz.494.2018.03.01.01.24.31; Thu, 01 Mar 2018 01:24:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966871AbeCAJWx (ORCPT + 99 others); Thu, 1 Mar 2018 04:22:53 -0500 Received: from mga12.intel.com ([192.55.52.136]:38009 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965026AbeCAJWv (ORCPT ); Thu, 1 Mar 2018 04:22:51 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2018 01:22:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,407,1515484800"; d="scan'208";a="38432106" Received: from pericsso-mobl.ger.corp.intel.com (HELO localhost) ([10.249.254.51]) by orsmga002.jf.intel.com with ESMTP; 01 Mar 2018 01:22:47 -0800 Date: Thu, 1 Mar 2018 11:22:45 +0200 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 2/3] tpm: reduce poll sleep time between send() and recv() in tpm_transmit() Message-ID: <20180301092222.GC29420@linux.intel.com> References: <20180228191828.20056-1-nayna@linux.vnet.ibm.com> <20180228191828.20056-2-nayna@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180228191828.20056-2-nayna@linux.vnet.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > - tpm_msleep(TPM_TIMEOUT); > + tpm_msleep(TPM_TIMEOUT_POLL); What about just calling schedule()? /Jarkko