On Wed, Sep 06, 2017 at 08:56:38AM -0400, Nayna Jain wrote:
Currently, get_burstcount() function sleeps for 5msec in a loopHow did you pick 1 ms delay? Should there be a constant defining it?
before retrying for next query to burstcount. However, if it takes
lesser time for TPM to return, this 5 msec delay is longer
This patch replaces the tpm_msleep time from 5msec to 1msec.
After this change, performance on a TPM 1.2 with an 8 byte
burstcount for 1000 extends improved from ~10sec to ~9sec.
Signed-off-by: Nayna Jain <nayna@xxxxxxxxxxxxxxxxxx>
Acked-by: Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx>
drivers/char/tpm/tpm_tis_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index d1eab29cb447..d710bbc4608b 100644
@@ -169,7 +169,7 @@ static int get_burstcount(struct tpm_chip *chip)
burstcnt = (value >> 8) & 0xFFFF;
} while (time_before(jiffies, stop));