mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sujit Reddy Thumma <sthumma@codeaurora.org>
To: Dmitry Antipov <dmitry.antipov@linaro.org>
Cc: linaro-dev@lists.linaro.org, patches@linaro.org,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: use usleep_range() in mmc_delay()
Date: Tue, 27 Dec 2011 10:10:25 +0530	[thread overview]
Message-ID: <4EF94C39.3070705@codeaurora.org> (raw)
In-Reply-To: <4EF1D97E.3000201@linaro.org>

Hi Antipov,

Sorry for the delayed response. Please find some comments below:

On 12/21/2011 6:35 PM, Dmitry Antipov wrote:
> On 12/21/2011 03:25 PM, Sujit Reddy Thumma wrote:
>
>> I have posted similar patch some time back.
>> http://comments.gmane.org/gmane.linux.ports.arm.msm/2119.
>>
>> Would you like to comment on that?
>
> - I believe we should forget about jiffies, HZ and other similar obsolete
> timekeeping stuff;
>
> - I have no ideas where did you get 'most typical' 20 ms. MMC subsystem
> uses
> mmc_delay() with two compile-time fixed values 1 and 10 ms, with the only
> exception of card-dependent sleep/awake timeout. I was unable to find a
> table
> with typical values, but it's rounded up to >= 1 ms anyway.

The main aim of my patch was to fix mmc_delay() to give accurate delay.
You might want to refer to Documentation/timers/timers-howto.txt 
(Section: SLEEPING FOR ~USECS OR SMALL MSECS) to know why usleep_range() 
must be used instead of msleep for delays less than 20ms (or more 
accurately two jiffies, since in HZ=100 systems this comes to 20ms).

Also, in the documentation it is suggested that for delays greater than 
10ms+ use msleep(). Although MMC subsystem doesn't use mmc_delay() for 
greater than 10ms today but I guess we should keep it for future purpose 
and just not have only usleep_range() as your patch did.

>
> Dmitry


  reply	other threads:[~2011-12-27  4:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21  6:56 Dmitry Antipov
2011-12-21 11:25 ` Sujit Reddy Thumma
2011-12-21 13:05   ` Dmitry Antipov
2011-12-27  4:40     ` Sujit Reddy Thumma [this message]
2012-01-13 13:22 ` Aaro Koskinen
2012-01-13 13:51   ` Dmitry Antipov
2012-01-13 14:52     ` Aaro Koskinen

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=4EF94C39.3070705@codeaurora.org \
    --to=sthumma@codeaurora.org \
    --cc=dmitry.antipov@linaro.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=patches@linaro.org \
    /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

Powered by JetHome