[Fwd: Re: sdhci can turn off irq up to 200 ms]
Hi,
I foward this here because it could interest some people caring about low latency. I have got no reply from upstream.
It may or not affect preempt-rt kernel.
For info the issue was found with ltt.
Matthieu
PS :
the sdhci driver contains others mdelay that should be killed.
-------- Message original --------
Sujet : Re: sdhci can turn off irq up to 200 ms
Date : Thu, 09 Jul 2009 12:28:01 +0200
De : Matthieu CASTET <[email protected]>
Pour : [email protected]
Copie à : [email protected], "[email protected]" <[email protected]>
Références : <[email protected]>
Quoted 15 lines · Matthieu CASTET
Hi,
sdhci code got tasklets (
sdhci_tasklet_cardandsdhci_tasklet_finish), that does :
{spin_lock_irqsaveif (cond) {
sdhci_resetsdhci_reset
}
spin_unlock_irqrestore
}
Quoted 9 lines
The problem is that
sdhci_reset[1] does busy pooling on a register up to a timeout of 100 ms.
That's not low latency friendly.On our system, we saw that
sdhci_resettake 1 ms. That should be because we enter in mdelay, even if the hardware clears the bit faster. I wonder why there is an mdelay(1). Usingcpu_relaxandtime_is_after_jiffiesshould makesdhci_resetfaster.
In case somebody cares, here a patch that reduce on our hardware sdhci_reset from 1 ms to 30 us.
Matthieu
drivers/mmc/host/sdhci.c +3 -4
@@ -156,18 +156,17 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask) host->clock =0 ;/* Wait max 100 ms */ - timeout =100 ; + timeout = jiffies +msecs_to_jiffies (100 );/* hw clears the bit when it's done */ while (sdhci_readb (host,SDHCI_SOFTWARE_RESET ) & mask) { -if (timeout ==0 ) { +if (time_is_before_jiffies (timeout)) {printk (KERN_ERR "%s: Reset 0x%x never completed.\n" ,mmc_hostname (host->mmc), (int )mask);sdhci_dumpregs (host);return ; } - timeout--; -mdelay (1 ); +cpu_relax (); }if (host->quirks &SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET )
New to list, rt-kernel question re Ubuntu 9.04
Been monitoring the list for a few days, my question might be a little basic for this list... but some one may be able to direct me to a possibly more relevant place to pose it...
I do (among other things) audio work... trying to get my Linux system (now, Ubuntu 9.04) to do some of the work. It has been a struggle so far, but I am currently having some success with (among a few others) Audacity... even using 'Jack,' etc. (it will input my Echo, Mia-Midi card from my Yamaha 01v digital mixer)... where as Ardour will not...
Anyway, some time ago I tried Ubuntu Studio (v. 8.04.1) that had the rt kernel built in, but since I was having other problems, had to revert to generic Ubuntu... & now I am on Ubuntu 9.04, generic. What I wish to do is a build of the rt kernel... but do not really know how to do this... or even really if it would (possibly) work (i.e., matters to anticipate). Any tips, pointers, directions, advise would be much appreciated...
Thanks,
Henry
Re: New to list, rt-kernel question re Ubuntu 9.04
Are there any special circumstances that makes you want to build the kernel yourself?
If not, I believe that Ubuntu provides an precompiled RT kernel. I guess the package you are looking for is the "linux-rt" package (and "linux-rt-headers" if you are going to compile any modules).
Quoted 26 lines · Henry W. Peters
Been monitoring the list for a few days, my question might be a little basic for this list... but some one may be able to direct me to a possibly more relevant place to pose it...
I do (among other things) audio work... trying to get my Linux system (now, Ubuntu 9.04) to do some of the work. It has been a struggle so far, but I am currently having some success with (among a few others) Audacity... even using 'Jack,' etc. (it will input my Echo, Mia-Midi card from my Yamaha 01v digital mixer)... where as Ardour will not...
Anyway, some time ago I tried Ubuntu Studio (v. 8.04.1) that had the rt kernel built in, but since I was having other problems, had to revert to generic Ubuntu... & now I am on Ubuntu 9.04, generic. What I wish to do is a build of the rt kernel... but do not really know how to do this... or even really if it would (possibly) work (i.e., matters to anticipate). Any tips, pointers, directions, advise would be much appreciated...
Thanks,
Henry--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 6 lines
Hälsningar/Regards Tobias Knutsson -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html