public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Chunhe Lan <b25806@freescale.com>
Cc: Chunhe Lan <Chunhe.Lan@freescale.com>,
	linux-mmc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	kumar.gala@freescale.com, cjb@laptop.org,
	Kumar Gala <galak@kernel.crashing.org>
Subject: Re: [PATCH v3 1/2] mmc: Move mmc_delay() to include/linux/mmc/core.h
Date: Fri, 21 Sep 2012 12:33:54 +0000	[thread overview]
Message-ID: <201209211233.54545.arnd@arndb.de> (raw)
In-Reply-To: <505CD3A5.6080101@freescale.com>

On Friday 21 September 2012, Chunhe Lan wrote:
> On 08/10/2012 09:27 AM, Arnd Bergmann wrote:
> > On Friday 10 August 2012, Chunhe Lan wrote:
> >
> >       cond_resched();
> >       mdelay(ms);
> >
> > sets off alarm bells, and I would always replace that with msleep().
>      I think that it does not replace with msleep().
>      When the time of sleep is very short, program should not been scheduled
>      in the context. Because it expends the more time.
> 

A time measured in miliseconds is never "very short" for the scheduler,
a lot of things can happen during that time span. The code I quoted
also does not care too much about accuracy, otherwise it would adapt
the time in the mdelay based on whether the cond_resched() actually
schedules to another thread.

	Arnd

  reply	other threads:[~2012-09-21 12:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 22:25 [PATCH v3 1/2] mmc: Move mmc_delay() to include/linux/mmc/core.h Chunhe Lan
2012-08-10 13:27 ` Arnd Bergmann
2012-09-21 20:52   ` Chunhe Lan
2012-09-21 12:33     ` Arnd Bergmann [this message]
2012-09-24 15:20       ` Chunhe Lan
2012-09-24 13:17         ` Arnd Bergmann
2012-09-24 14:38           ` Tabi Timur-B04825

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=201209211233.54545.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Chunhe.Lan@freescale.com \
    --cc=b25806@freescale.com \
    --cc=cjb@laptop.org \
    --cc=galak@kernel.crashing.org \
    --cc=kumar.gala@freescale.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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