From patchwork Fri Jan 31 23:05:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoran Markovic X-Patchwork-Id: 23996 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CB8C9202FA for ; Fri, 31 Jan 2014 23:06:19 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id w20sf11792857vbb.11 for ; Fri, 31 Jan 2014 15:06:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=97MdPI3msuI3ZoQdhDJp2aT9elIGW/5T8rqGfDEIcwQ=; b=TsLJRQ/0iQrm1xZSwiPeoz00hWxJEiip5aFRnrRo+1VRPzc1ZJYuQrrCelHLp12d7r FEPLbYvgGf6YuHleFiXOllg5FoN0gAfy9UyMbCD1MIUF+WP9WsE6kkwcpQ+LQJzmD+ob 8P4B2o3PPp+AFV121zYzofEyZOwC6FT9P7p3rm02/zNc7waVbH85w1TgiYmhFR0sBagU GiwnkyAzb1UJDvaM/goN0cEZshiYBTfzwQ60ixnoB06nLKpfgQAQmE8wSpNZySL4XRaB Aw17I8Td+THxq5F8ukO/XXUlG3caFpl2dvSkH5JMHujm+abzG8/qtFz2FvGbnmv+tSAN hyRw== X-Gm-Message-State: ALoCoQl6hbyzP78Z4j41fP/GE0ld630yNfVESpuvC3vxJumZhYy3L+E0ELPfc4gskSMNYfRkwfWR X-Received: by 10.58.144.41 with SMTP id sj9mr8309960veb.8.1391209579007; Fri, 31 Jan 2014 15:06:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.4 with SMTP id d4ls1181900qga.20.gmail; Fri, 31 Jan 2014 15:06:18 -0800 (PST) X-Received: by 10.52.166.9 with SMTP id zc9mr15240449vdb.16.1391209578954; Fri, 31 Jan 2014 15:06:18 -0800 (PST) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id y3si4062215vdo.19.2014.01.31.15.06.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 15:06:18 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ie18so3367887vcb.26 for ; Fri, 31 Jan 2014 15:06:18 -0800 (PST) X-Received: by 10.220.139.136 with SMTP id e8mr141765vcu.34.1391209578868; Fri, 31 Jan 2014 15:06:18 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp135057vcz; Fri, 31 Jan 2014 15:06:18 -0800 (PST) X-Received: by 10.66.26.236 with SMTP id o12mr23833826pag.15.1391209578030; Fri, 31 Jan 2014 15:06:18 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si12113716pax.44.2014.01.31.15.06.17; Fri, 31 Jan 2014 15:06:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932876AbaAaXGP (ORCPT + 6 others); Fri, 31 Jan 2014 18:06:15 -0500 Received: from mail-pd0-f182.google.com ([209.85.192.182]:39092 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932874AbaAaXGO (ORCPT ); Fri, 31 Jan 2014 18:06:14 -0500 Received: by mail-pd0-f182.google.com with SMTP id v10so4802115pde.41 for ; Fri, 31 Jan 2014 15:06:14 -0800 (PST) X-Received: by 10.68.178.66 with SMTP id cw2mr10481208pbc.89.1391209574213; Fri, 31 Jan 2014 15:06:14 -0800 (PST) Received: from vb-linaro.ric.broadcom.com ([216.31.219.19]) by mx.google.com with ESMTPSA id qw8sm31260913pbb.27.2014.01.31.15.06.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 15:06:13 -0800 (PST) From: Zoran Markovic To: linux-kernel@vger.kernel.org Cc: linux-mmc@vger.kernel.org, Shaibal Dutta , Chris Ball , Guennadi Liakhovetski , Ulf Hansson , H Hartley Sweeten , Andrew Morton , Simon Baatz , Laurent Pinchart , Tejun Heo , Zoran Markovic Subject: [RFC PATCH] mmc: move clock gating work to power efficient workqueue Date: Fri, 31 Jan 2014 15:05:41 -0800 Message-Id: <1391209541-17288-1-git-send-email-zoran.markovic@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-mmc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zoran.markovic@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Shaibal Dutta 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 Cc: Guennadi Liakhovetski Cc: Ulf Hansson Cc: H Hartley Sweeten Cc: Andrew Morton Cc: Simon Baatz Cc: Laurent Pinchart Cc: Tejun Heo Signed-off-by: Shaibal Dutta [zoran.markovic@linaro.org: Rebased to latest kernel. Added commit message. Fixed code alignment.] Signed-off-by: Zoran Markovic --- 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); }