All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: "Tardy, Pierre" <pierre.tardy@intel.com>
Cc: Philip Rakity <prakity@marvell.com>,
	Pierre Tardy <tardyp@gmail.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [RFC} sdhci.c set_ios -- disable global interrupts and Question on Power Management
Date: Tue, 15 Feb 2011 09:39:17 +0100	[thread overview]
Message-ID: <20110215083917.GB3517@pengutronix.de> (raw)
In-Reply-To: <8250E4885F9967469CAC3FB5CBA2CE69935205E445@irsmsx501.ger.corp.intel.com>

On Mon, Feb 14, 2011 at 06:41:47PM +0000, Tardy, Pierre wrote:
> Philip,
> > > And, more important, you will do cond_resched while holding you
> > > spinlock, which is *bad*.
> > > What if the mmc stack will call you again from another thread? deadlock...
> 
> > Assumptions -- Please Confirm
> > -------------------------------------------
> No need to do assumptions, schedule while holding spinlocks is bad, your kernel will oops with something like:
> BUG: scheduling while in atomic.

I thought the assumptions were made in order to check where the spinlock is
_really_ needed. Thinking in that direction is a good aproach IMO.

> > >> @@ -1108,7 +1108,7 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
> > >>         * can apply clock after applying power
> > >>         */
> > >>        if (host->quirks & SDHCI_QUIRK_DELAY_AFTER_POWER)
> > >> -               mdelay(10);
> > >> +               mmc_delay(10);
> > > Do you need this quirk in your platform?
> > 
> > No
> Then, you dont have any mdelay in your set_ios, and you are trying to optimize something that never happen.

There are some more mdelays in error-conditions which could happen occasionally
(see sdhci_send_command, spinlocked by sdhci_request for example).

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  parent reply	other threads:[~2011-02-15  8:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-13  5:39 [RFC} sdhci.c set_ios -- disable global interrupts and Question on Power Management Philip Rakity
2011-02-13 10:25 ` Pierre Tardy
2011-02-13 17:57   ` Philip Rakity
2011-02-14  5:50     ` Philip Rakity
2011-02-14  9:29       ` Pierre Tardy
2011-02-14  9:55         ` Wolfram Sang
2011-02-14 17:27           ` Philip Rakity
2011-02-15  9:13             ` Wolfram Sang
2011-02-14 18:34         ` Philip Rakity
2011-02-14 18:41           ` Tardy, Pierre
2011-02-14 20:17             ` Philip Rakity
2011-02-14 20:44             ` Philip Rakity
2011-02-15  8:39             ` Wolfram Sang [this message]
2011-02-15  3:09         ` Philip Rakity

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=20110215083917.GB3517@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=pierre.tardy@intel.com \
    --cc=prakity@marvell.com \
    --cc=tardyp@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.