Skip to content

mmc: sdio: avoid waking idle host during suspend/resume

Samuel Wu linux-mmc 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mmc: sdhci-s3c: runtime-resume host before system suspenddrivers/mmc/host/sdhci-s3c.c+2 -00 replies
2/3mmc: dw_mmc: restore IOS on runtime resume whenever card power is ondrivers/mmc/host/dw_mmc.c+1 -10 replies
3/3mmc: sdio: avoid waking idle host on keep-power suspend/resumedrivers/mmc/core/sdio.c+32 -40 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/3] mmc: sdio: avoid waking idle host during suspend/resume

mmc_sdio_suspend() and mmc_sdio_resume() always claim the host, which runtime-resumes it. If the card keeps power, uses no SDIO IRQs, and nobody holds the host, neither function does bus I/O, so an idle host is woken for nothing.

Skip the host claim in that case, saving cycles and reducing suspend and resume latency.

Patch 1/3 and 2/3 are setup patches for patch 3/3. They remove the hidden dependency that relied on the SDIO core always waking the host during suspend and resume. Patch 3/3 ensures that the host is woken only when it needs to be.

Comparing with and without this patchseries on a Pixel Watch 4:
- mmc1 suspend + resume: 11.59 ms -> 0.01 ms
- sdhci suspend: 3.75 ms -> 0.002 ms
- dpm_suspend median: 38.79 ms -> 32.51 ms

Samuel Wu (3):
mmc: sdhci-s3c: runtime-resume host before system suspend
mmc: dw_mmc: restore IOS on runtime resume whenever card power is on
mmc: sdio: avoid waking idle host on keep-power suspend/resume

 drivers/mmc/core/sdio.c      | 36 ++++++++++++++++++++++++++++++++----
 drivers/mmc/host/dw_mmc.c    |  2 +-
 drivers/mmc/host/sdhci-s3c.c |  2 ++
 3 files changed, 35 insertions(+), 5 deletions(-)
Signature · 1 line
2.56.1.831.g720f3f5937-goog