LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Simon Huggins <huggie@earth.li>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Scheduler broken? sdhci issues with scheduling
Date: Sat, 1 Mar 2008 15:08:10 +0100	[thread overview]
Message-ID: <20080301150810.09bed3d0@mjolnir.drzeus.cx> (raw)
In-Reply-To: <20080301124203.GL24533@paranoidfreak.co.uk>

On Sat, 1 Mar 2008 12:42:04 +0000
Simon Huggins <huggie@earth.li> wrote:

> > so neither precise, nor imprecise timings help??
> 
> I don't know.  I don't really understand the patches I applied I'm
> afraid; I'm just reporting the results.
> 
> I've cc'd Pierre Ossman so he might have a look from the sdhci point of
> view.
> 
> Pierre, the thread starts here:
> http://lkml.org/lkml/2008/2/29/118
> 

I'm afraid I can't add that much...

Ingo, the basic problem is this:

The sdhci controllers are not supposed to signal "card insertion" before they have a stable connection with the card. But most (all?) hardware ignores this and signals immediately. This means we need a delay to handle bouncing connectors. This delay is supposed to be 500 ms, but on Simon's system it is in the order of tens of milliseconds.

The mechanism is not msleep(), nor mdelay(), but a delayed work queue. That's why I told Simon to talk to you as that seems like scheduler territory.

The call chain is:

1. sdhci_irq()
2. sdhci_tasklet_card() <- delay is calculated here
3. mmc_detect_change()
4. mmc_schedule_delayed_work()
5. queue_delayed_work()

msleep() and mdelay() are also affected, but this is the major symptom.

Rgds

-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  PulseAudio, core developer          http://pulseaudio.org
  rdesktop, core developer          http://www.rdesktop.org

  reply	other threads:[~2008-03-01 14:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 11:52 Simon Huggins
2008-02-29 13:34 ` Ingo Molnar
2008-02-29 13:51   ` Ingo Molnar
2008-02-29 14:00     ` Ingo Molnar
2008-02-29 19:39       ` Simon Huggins
2008-02-29 20:39         ` Ingo Molnar
2008-03-01 12:42           ` Simon Huggins
2008-03-01 14:08             ` Pierre Ossman [this message]
2008-03-02 10:40 ` Pavel Machek
2008-03-02 18:04   ` Simon Huggins
2008-03-03 19:43   ` Pierre Ossman
2008-03-03 20:38     ` Pavel Machek
2008-03-03 21:05       ` Pierre Ossman
2008-03-13 21:17         ` Simon Huggins
2008-03-15 15:04           ` Pierre Ossman
2008-04-20 21:07             ` Simon Huggins

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=20080301150810.09bed3d0@mjolnir.drzeus.cx \
    --to=drzeus-list@drzeus.cx \
    --cc=huggie@earth.li \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --subject='Re: Scheduler broken? sdhci issues with scheduling' \
    /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

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).