LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nayna Jain <nayna@linux.vnet.ibm.com>
To: J Freyensee <why2jjj.linux@gmail.com>, 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
Subject: Re: [PATCH v3 1/2] tpm: reduce poll sleep time in tpm_transmit()
Date: Mon, 14 May 2018 16:09:41 +0530	[thread overview]
Message-ID: <4896f0b6-70b7-77ad-1b33-f13890b6fec2@linux.vnet.ibm.com> (raw)
In-Reply-To: <107cd9f7-69a3-dbb8-1a61-541172832a0c@linux.vnet.ibm.com>



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 <why2jjj.linux@gmail.com>
>
> Thanks !!
>
> Thanks & Regards,
>     - Nayna
>
>


  reply	other threads:[~2018-05-14 10:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 16:07 [PATCH v3 0/2] tpm: improving granularity in poll sleep times Nayna Jain
2018-05-07 16:07 ` [PATCH v3 1/2] tpm: reduce poll sleep time in tpm_transmit() Nayna Jain
2018-05-08 16:34   ` J Freyensee
2018-05-10 12:41     ` Nayna Jain
2018-05-14 10:39       ` Nayna Jain [this message]
2018-05-14 10:46   ` Jarkko Sakkinen
2018-05-14 10:47     ` Jarkko Sakkinen
2018-05-07 16:07 ` [PATCH v3 2/2] tpm: reduce polling time to usecs for even finer granularity Nayna Jain
2018-05-08 16:34   ` J Freyensee
2018-05-14 10:52   ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4896f0b6-70b7-77ad-1b33-f13890b6fec2@linux.vnet.ibm.com \
    --to=nayna@linux.vnet.ibm.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=patrickc@us.ibm.com \
    --cc=peterhuewe@gmx.de \
    --cc=tpmdd@selhorst.net \
    --cc=why2jjj.linux@gmail.com \
    --cc=zohar@linux.vnet.ibm.com \
    --subject='Re: [PATCH v3 1/2] tpm: reduce poll sleep time in tpm_transmit()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).