Re: sdhci : reduce irq off latency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The main problem is sdhci_send_command function. it loops at while
function infinitely.

I just modify it to use udelay at there. then it's working well.
also I reduce the granularity as 1 usec instead of 10 usec (as you suggested).
it's also works.

Thank you,
Kyungmin Park

On Fri, Jun 18, 2010 at 4:57 PM, Matthieu CASTET
<matthieu.castet@xxxxxxxxxx> wrote:
> Hi,
>
> Thanks you for the test.
>
> here a new version of the patch. It doesn't replace mdelay with jiffies
> anymore. It changes mdelay to udelay (the granularity of 1 ms becomes 10
> us).
> I didn't mesure irq off latency with this patch.
>
> Matthieu
>
>
> Kyungmin Park a écrit :
>>
>> Hi,
>>
>> Not good news. This patch make a hang at probe time.
>> it's tested against commit 7e27d6e778cd87b6f2415515d7127eba53fe5d02
>> Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
>> Date:   Fri Jun 11 19:14:04 2010 -0700
>>
>>    Linux 2.6.35-rc3
>>
>> Thank you,
>> Kyungmin Park
>>
>> On Thu, Jun 17, 2010 at 6:07 PM, Matthieu CASTET
>> <matthieu.castet@xxxxxxxxxx> wrote:
>>>
>>> sdhci code got tasklets (sdhci_tasklet_card and sdhci_tasklet_finish),
>>> that does :
>>> {
>>> spin_lock_irqsave
>>>
>>> if (cond) {
>>> sdhci_reset
>>> sdhci_reset
>>> }
>>>
>>> spin_unlock_irqrestore
>>> }
>>>
>>> sdhci_reset {
>>> ...
>>> while (read_reg) {
>>> if (timeout == 0)
>>>  break;
>>> timeout--;
>>> mdelay(1);
>>> }
>>> ...
>>> }
>>>
>>>
>>> The problem is that sdhci_reset [1] does busy pooling (with a granularity
>>> of
>>> 1 ms) on a register up to a timeout of 100 ms.
>>>
>>> With the current code, we got irq off during 2*1ms. With the attached
>>> patch
>>> we reduce irq off to 30 us.
>>>
>>> Note that worst case 100 ms irq off still exist.
>>>
>>> Signed-off-by: Matthieu CASTET <matthieu.castet@xxxxxxxxxx>
>>>
>>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux