Received: by 10.223.185.116 with SMTP id b49csp2602403wrg; Mon, 5 Mar 2018 05:53:06 -0800 (PST) X-Google-Smtp-Source: AG47ELvD6WQRAg6wXEnxjwDvNQr5VASGKG+bQM/btat73Yxk+4QRILbmPlVbWgvLPL5HHy20Lpfx X-Received: by 2002:a17:902:3303:: with SMTP id a3-v6mr13113675plc.399.1520257986720; Mon, 05 Mar 2018 05:53:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520257986; cv=none; d=google.com; s=arc-20160816; b=o/aZb42rmXU9zNh0Pz3iWjW2HII4H6VvPtmNzva0OYqA912oUkjTFDvsp2ieT2Fy8O GfDPytEBIWMDLQf4nPbbIwIttRkuXU4ZW+QR/5Qieba5PvpZUShP54itValGxKoZucmY VgXAFJPl5keoZp6kx7ORd4HGATwPaGZ1OSJ0FGZ1eEMhDi4z3mliENyf3Z4zOIaLGCVj ZvucbEUWij+dQ3+G0r728VEhUYFNuT3XZwcLgr+7iq3kjATlorkRvxrSisfyakn6JFzX sr/R4gK2kaH+2Gd754h4w9wBR5WGTE1PQki7uuCwjw91Tt9ymKOzCblpft/9nLQGj8sp dA8A== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=j6lNJpjcMO1+K1O53uPPpYf3bH8MeaaTKVRubkTOu7s=; b=EoHTqMeoJkjy1fcjwDoOU3rYrkjOe/6OT9fKkT2JJs+Ud0eNTbTaf7xFSGo60SeKD5 gkMFspyW+BBUyfkqk7tT7PyFDksyRfhljXiGVmko8DCK3pRcbEl8ggRaKDpULqFsKeRq onNdtWa6qVxbbFZxFBi7ft4plIiEUYFAw5NqaZYvySz43pe4RDXc6I5UGVqIP/Xy9M7d Xm1oea+fDTEiVPCVLdvrPnmHDJR+UgSPOhLtYN2tA/zurih8EJHkvhz3idvka46jSKrN gE9B8p/lJXOM2EFI5kgoo/9RiYzeD48r3PQ90zC596prCMrHBCyogt/m1xu5+ABuoT00 RaDg== 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 r12si8404303pgt.200.2018.03.05.05.52.51; Mon, 05 Mar 2018 05:53:06 -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 S934356AbeCEK4k (ORCPT + 99 others); Mon, 5 Mar 2018 05:56:40 -0500 Received: from mga01.intel.com ([192.55.52.88]:33595 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933623AbeCEK4h (ORCPT ); Mon, 5 Mar 2018 05:56:37 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2018 02:56:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,426,1515484800"; d="scan'208";a="22065707" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.54]) by fmsmga008.fm.intel.com with ESMTP; 05 Mar 2018 02:56:34 -0800 Date: Mon, 5 Mar 2018 12:56:33 +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: <20180305105633.GE25377@linux.intel.com> References: <20180228191828.20056-1-nayna@linux.vnet.ibm.com> <20180228191828.20056-2-nayna@linux.vnet.ibm.com> <20180301092222.GC29420@linux.intel.com> <6ef601be-5627-6746-bd4a-4f391aba8b04@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6ef601be-5627-6746-bd4a-4f391aba8b04@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 Fri, Mar 02, 2018 at 12:26:35AM +0530, Nayna Jain wrote: > > > 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 kernel/sched/core.c /Jarkko