tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Nayna <nayna@linux.vnet.ibm.com>
To: tpmdd-devel <tpmdd-devel@lists.sourceforge.net>,
	Gleixner <tglx@linutronix.de>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Dan Morav <dmorav@nuvoton.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-security-module <linux-security-module@vger.kernel.org>,
	linux-ima-devel <linux-ima-devel@lists.sourceforge.net>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	Thomas@mx0b-001b2d01.pphosted.com
Subject: Re: [tpmdd-devel] [RFC PATCH] tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver
Date: Thu, 6 Apr 2017 20:57:14 +0530	[thread overview]
Message-ID: <58E65E52.8000304@linux.vnet.ibm.com> (raw)
In-Reply-To: <1487895987.3193.168.camel@linux.vnet.ibm.com>

We continued analyzing the msleep() behaviour. I tested running msleep() 
(without TPM interactions), by writing a kernel module that runs 
msleep() in a loop for a fixed number of iterations.

Based on these test results, as shown below, the observations are:

1. Non-cascading timers, as introduced by commit 500462a9de65, is 
working as expected, since all the timers expired well within ring 0.
2. However, the minimum delay doubled, causing the average delay to 
increase by ~30%.

CONFIG_HZ = 250:

For 1000 iterations, each of 1 msecs
=====================================

Kernel/Timer |       msleep          |    usleep_range      |

4.7          | Min: 4.89, Avg: 8     | Min: 1.12 Avg: 1.58  |
4.10         | Min: 11.9, Avg: 11.19 | Min: 1.31 Avg: 1.36  |


For 3000 iterations, each of 1 msecs.
=====================================

Kernel/Timer |        msleep         |    usleep_range     |

4.7          | Min: 6.55, Avg: 8.02  | Min: 1.05 Avg: 1.53 |
4.10         | Min: 11.8, Avg: 12.04 | Min: 1.02 Avg: 1.35 |


Thomas, can the minimum delay be improved ?

Thanks & Regards,
- Nayna



  reply	other threads:[~2017-04-06 15:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 23:46 [RFC PATCH] tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver Mimi Zohar
2017-02-24  0:00 ` Jason Gunthorpe
2017-02-24  0:26   ` Mimi Zohar
2017-04-06 15:27     ` Nayna [this message]
2017-02-24 17:01 ` [tpmdd-devel] " Jarkko Sakkinen
     [not found]   ` <20170224170100.prwbcsffxdqjudc2-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-24 17:29     ` Mimi Zohar
     [not found]       ` <1487957342.3193.200.camel-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-03-02  8:33         ` Jarkko Sakkinen
     [not found]           ` <20170302083347.q33wiwsdcwbxyrp6-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-07 13:39             ` Mimi Zohar
     [not found]               ` <1488893960.3216.45.camel-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-03-09 11:05                 ` Jarkko Sakkinen
2017-03-10 11:41                   ` Mimi Zohar

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=58E65E52.8000304@linux.vnet.ibm.com \
    --to=nayna@linux.vnet.ibm.com \
    --cc=Thomas@mx0b-001b2d01.pphosted.com \
    --cc=dmorav@nuvoton.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-ima-devel@lists.sourceforge.net \
    --cc=linux-security-module@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=zohar@linux.vnet.ibm.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).