Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1731310 > unrolled thread
| Started by | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| First post | 2017-09-13 02:50 +0200 |
| Last post | 2017-09-14 14:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 4/4] tpm: use tpm_msleep() value as max delay Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-09-13 02:50 +0200
Re: [PATCH v2 4/4] tpm: use tpm_msleep() value as max delay Nayna Jain <nayna@linux.vnet.ibm.com> - 2017-09-14 11:30 +0200
Re: [PATCH v2 4/4] tpm: use tpm_msleep() value as max delay Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-09-14 14:30 +0200
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2017-09-13 02:50 +0200 |
| Subject | Re: [PATCH v2 4/4] tpm: use tpm_msleep() value as max delay |
| Message-ID | <up42l-89-5@gated-at.bofh.it> |
On Wed, Sep 06, 2017 at 08:56:39AM -0400, Nayna Jain wrote:
> Currently, tpm_msleep() uses delay_msec as the minimum value in
> usleep_range. However, that is the maximum time we want to wait.
> The function is modified to use the delay_msec as the maximum
> value, not the minimum value.
>
> After this change, performance on a TPM 1.2 with an 8 byte
> burstcount for 1000 extends improved from ~9sec to ~8sec.
>
> Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
> Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
> ---
> drivers/char/tpm/tpm.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> index eb2f8818eded..ff5a8b7b80b9 100644
> --- a/drivers/char/tpm/tpm.h
> +++ b/drivers/char/tpm/tpm.h
> @@ -533,8 +533,8 @@ int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout,
>
> static inline void tpm_msleep(unsigned int delay_msec)
> {
> - usleep_range(delay_msec * 1000,
> - (delay_msec * 1000) + TPM_TIMEOUT_RANGE_US);
> + usleep_range((delay_msec * 1000) - TPM_TIMEOUT_RANGE_US,
> + delay_msec * 1000);
> };
>
> struct tpm_chip *tpm_chip_find_get(int chip_num);
> --
> 2.13.3
>
Doesn't this need a Fixes tag?
/Jarkko
[toc] | [next] | [standalone]
| From | Nayna Jain <nayna@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-09-14 11:30 +0200 |
| Message-ID | <upyD8-3bN-35@gated-at.bofh.it> |
| In reply to | #1731310 |
On 09/13/2017 06:17 AM, Jarkko Sakkinen wrote:
> On Wed, Sep 06, 2017 at 08:56:39AM -0400, Nayna Jain wrote:
>> Currently, tpm_msleep() uses delay_msec as the minimum value in
>> usleep_range. However, that is the maximum time we want to wait.
>> The function is modified to use the delay_msec as the maximum
>> value, not the minimum value.
>>
>> After this change, performance on a TPM 1.2 with an 8 byte
>> burstcount for 1000 extends improved from ~9sec to ~8sec.
>>
>> Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
>> Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
>> ---
>> drivers/char/tpm/tpm.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
>> index eb2f8818eded..ff5a8b7b80b9 100644
>> --- a/drivers/char/tpm/tpm.h
>> +++ b/drivers/char/tpm/tpm.h
>> @@ -533,8 +533,8 @@ int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout,
>>
>> static inline void tpm_msleep(unsigned int delay_msec)
>> {
>> - usleep_range(delay_msec * 1000,
>> - (delay_msec * 1000) + TPM_TIMEOUT_RANGE_US);
>> + usleep_range((delay_msec * 1000) - TPM_TIMEOUT_RANGE_US,
>> + delay_msec * 1000);
>> };
>>
>> struct tpm_chip *tpm_chip_find_get(int chip_num);
>> --
>> 2.13.3
>>
> Doesn't this need a Fixes tag?
Yeah.. will add.
- Nayna
> /Jarkko
>
[toc] | [prev] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2017-09-14 14:30 +0200 |
| Message-ID | <upBrj-4Zc-3@gated-at.bofh.it> |
| In reply to | #1732141 |
On Thu, Sep 14, 2017 at 02:55:34PM +0530, Nayna Jain wrote:
>
>
> On 09/13/2017 06:17 AM, Jarkko Sakkinen wrote:
> > On Wed, Sep 06, 2017 at 08:56:39AM -0400, Nayna Jain wrote:
> > > Currently, tpm_msleep() uses delay_msec as the minimum value in
> > > usleep_range. However, that is the maximum time we want to wait.
> > > The function is modified to use the delay_msec as the maximum
> > > value, not the minimum value.
> > >
> > > After this change, performance on a TPM 1.2 with an 8 byte
> > > burstcount for 1000 extends improved from ~9sec to ~8sec.
> > >
> > > Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
> > > Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
> > > ---
> > > drivers/char/tpm/tpm.h | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> > > index eb2f8818eded..ff5a8b7b80b9 100644
> > > --- a/drivers/char/tpm/tpm.h
> > > +++ b/drivers/char/tpm/tpm.h
> > > @@ -533,8 +533,8 @@ int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout,
> > > static inline void tpm_msleep(unsigned int delay_msec)
> > > {
> > > - usleep_range(delay_msec * 1000,
> > > - (delay_msec * 1000) + TPM_TIMEOUT_RANGE_US);
> > > + usleep_range((delay_msec * 1000) - TPM_TIMEOUT_RANGE_US,
> > > + delay_msec * 1000);
> > > };
> > > struct tpm_chip *tpm_chip_find_get(int chip_num);
> > > --
> > > 2.13.3
> > >
> > Doesn't this need a Fixes tag?
> Yeah.. will add.
No need just for that. I'll test this when I'm back in Finland.
It was a question just to check that I'm in the same page :-)
/Jarkko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web