Skip to content

sdhci: Move real work out of an atomic context

Anton Vorontsov linux-mmc linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8sdhci: Turn timeout timer into delayed workdrivers/mmc/host/sdhci.c drivers/mmc/host/sdhci.h+10 -70 replies
2/8sdhci: Use work structs instead of taskletsdrivers/mmc/host/sdhci.c drivers/mmc/host/sdhci.h+23 -290 replies
3/8sdhci: Clear interrupt status register just oncedrivers/mmc/host/sdhci.c+6 -170 replies
4/8sdhci: Use threaded IRQ handlerdrivers/mmc/host/sdhci.c+28 -190 replies
5/8sdhci: Turn host->lock into a mutexdrivers/mmc/host/sdhci.c drivers/mmc/host/sdhci.h+24 -320 replies
6/8sdhci: Get rid of card detect workdrivers/mmc/host/sdhci.c drivers/mmc/host/sdhci.h+2 -130 replies
7/8sdhci: Get rid of mdelay()s where it is safe and makes sensedrivers/mmc/host/sdhci-of-esdhc.c drivers/mmc/host/sdhci.c+4 -40 replies
8/8sdhci: Use jiffies instead of a timeout counterdrivers/mmc/host/sdhci.c+5 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] sdhci: Move real work out of an atomic context

Hi all,

Currently the sdhci driver does everything in the atomic context. And what is worse, PIO transfers are made from the IRQ handler.

This causes huge latencies (up to 120 ms). On some P2020 SOCs, DMA and card detection is broken, which means that kernel polls for the card via PIO transfers every second. Needless to say that this is quite bad.

So, this patch set reworks sdhci code to avoid atomic context, almost completely. We only do two device memory operations in the atomic context, and all the rest is threaded.

I noticed no throughput drop neither with PIO transfers nor with DMA (tested on MPC8569E CPU), while latencies should be greatly improved.

Thanks,

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2