From patchwork Fri Jan 31 21:48:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoran Markovic X-Patchwork-Id: 3563891 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D5F6DC02DC for ; Fri, 31 Jan 2014 21:48:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7BA420253 for ; Fri, 31 Jan 2014 21:48:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06D6A20254 for ; Fri, 31 Jan 2014 21:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933045AbaAaVsj (ORCPT ); Fri, 31 Jan 2014 16:48:39 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:62465 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933020AbaAaVsi (ORCPT ); Fri, 31 Jan 2014 16:48:38 -0500 Received: by mail-pb0-f44.google.com with SMTP id rq2so4896498pbb.31 for ; Fri, 31 Jan 2014 13:48:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z0oWkIMpi4ShC+IQweySPoDchPg9mpM22B+uRm2UthQ=; b=NB5ya17dmGDDTaUzJN5owKda73yJ5uhGobqDAnYOzXK/OedXgXBlJxXpBaIGOmn19l 1sYkAPGFCnGQPO5BVvHYXSSTSjycHR4uZTJUyDExjtGOlbMSgcRVLtL3XAy+SdK6ad75 JN+vW1qXpmmrjoxsjFQNtXdG/DqWZ59/nqxWBz5hO/BWT3XKueV5M0PFykkFMKtv7pvq 0pElhkgTYqobawBVPdcBbNXaxLtt4bhB14bNhj+ClesGGREVbKshuF7TrhqFjQ6GMn7c VVQFLs7Xme7sUvYGCQGeSwvo1Pr6Bd0wmDhd8e7CR6VlzFxJW3aD058G1X/qXDY057zj KGjw== X-Gm-Message-State: ALoCoQl7rIDWdVTlwnozOzpGuo0f0ZX1fHxcZcPEmA5x4hTNCribFMnk0lCBE6WlFIn4mnimwtXN X-Received: by 10.66.159.132 with SMTP id xc4mr22970511pab.27.1391204918066; Fri, 31 Jan 2014 13:48:38 -0800 (PST) Received: from vb-linaro.ric.broadcom.com ([216.31.219.19]) by mx.google.com with ESMTPSA id qq5sm30899926pbb.24.2014.01.31.13.48.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 13:48:37 -0800 (PST) From: Zoran Markovic To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, Shaibal Dutta , Pavel Machek , "Rafael J. Wysocki" , Len Brown , Zoran Markovic Subject: [RFC PATCH] power: move pm_qos update timeout handler to power-efficient workqueue Date: Fri, 31 Jan 2014 13:48:22 -0800 Message-Id: <1391204902-13389-1-git-send-email-zoran.markovic@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shaibal Dutta To avoid waking up idle CPUs, allow the scheduler to select the best CPU to handle pm_qos update timeouts. This extends idle residency times and conserves power. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Len Brown Signed-off-by: Shaibal Dutta [zoran.markovic@linaro.org: Rebased to latest kernel. Fixed code alignment. Added commit message.] Signed-off-by: Zoran Markovic --- kernel/power/qos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 8dff9b4..5e35a3a 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c @@ -405,7 +405,8 @@ void pm_qos_update_request_timeout(struct pm_qos_request *req, s32 new_value, pm_qos_array[req->pm_qos_class]->constraints, &req->node, PM_QOS_UPDATE_REQ, new_value); - schedule_delayed_work(&req->work, usecs_to_jiffies(timeout_us)); + queue_delayed_work(system_power_efficient_wq, + &req->work, usecs_to_jiffies(timeout_us)); } /**