2014-01-31 23:06:17

by Zoran Markovic

[permalink] [raw]
Subject: [RFC PATCH] mmc: move clock gating work to power efficient workqueue

From: Shaibal Dutta <[email protected]>

Instead of binding the clock gating work to the CPU that scheduled it,
allow the scheduler to select the best CPU to handle it. This extends
idle residency times and conserves power.

This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected.

Cc: Chris Ball <[email protected]>
Cc: Guennadi Liakhovetski <[email protected]>
Cc: Ulf Hansson <[email protected]>
Cc: H Hartley Sweeten <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Simon Baatz <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Shaibal Dutta <[email protected]>
[[email protected]: Rebased to latest kernel. Added commit message.
Fixed code alignment.]
Signed-off-by: Zoran Markovic <[email protected]>
---
drivers/mmc/core/host.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 49bc403..a787f1b 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -207,8 +207,9 @@ void mmc_host_clk_release(struct mmc_host *host)
host->clk_requests--;
if (mmc_host_may_gate_card(host->card) &&
!host->clk_requests)
- schedule_delayed_work(&host->clk_gate_work,
- msecs_to_jiffies(host->clkgate_delay));
+ queue_delayed_work(system_power_efficient_wq,
+ &host->clk_gate_work,
+ msecs_to_jiffies(host->clkgate_delay));
spin_unlock_irqrestore(&host->clk_lock, flags);
}

--
1.7.9.5