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: 23992 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6EB9A202B2 for ; Fri, 31 Jan 2014 21:48:48 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id x13sf17835883ief.6 for ; Fri, 31 Jan 2014 13:48:47 -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=elEJEInfOdV/soaexZAbD9vxf87f+CmQUHhxsb4FKfU=; b=X3k/VObzoWudjQZi01MLDxGTwFxXJq+U3HpPKaE4hhrRdOIgZeBTaZIlCeSky8HqHZ oqBVLWpYM5eNzRq9ixOQ3WAr3OD+zA0a6+l8lyG6mVL08kaf1M0mQ8cLJQOfDt4S5Zi/ QJeI5frre1Dy/WzsvewUejKanc0cUFeoAupeVRBiQaS8sr/rbWabCbWyBzKDhgCoMYjF j0RoTvoNmCc6R8tZ2kXSpQg1e3kXI6H3QarW9kTHO6GwC+4/wFKgl/wR6wykp1gBlOSW czxcb/Qas36vgYmMOMBghVNT0T0JgS/s/iKOAYPPGjxSIao247QlvFd9qUjn4w5aiZm0 TE+w== X-Gm-Message-State: ALoCoQnkiZiU+CxNxaA2lNn2zWt4TpdyV5xwCM04vRpdhI0TV0vQWd7GTz8ed1CVteMVpaia6m9R X-Received: by 10.43.103.136 with SMTP id di8mr7343748icc.14.1391204927766; Fri, 31 Jan 2014 13:48:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.37 with SMTP id u34ls1187280qgu.37.gmail; Fri, 31 Jan 2014 13:48:47 -0800 (PST) X-Received: by 10.220.124.65 with SMTP id t1mr2955594vcr.26.1391204927675; Fri, 31 Jan 2014 13:48:47 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id tj7si3965721vdc.150.2014.01.31.13.48.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 13:48:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oz11so3458166veb.4 for ; Fri, 31 Jan 2014 13:48:47 -0800 (PST) X-Received: by 10.58.200.168 with SMTP id jt8mr1985113vec.30.1391204927553; Fri, 31 Jan 2014 13:48:47 -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 u4csp128077vcz; Fri, 31 Jan 2014 13:48:47 -0800 (PST) X-Received: by 10.68.66.33 with SMTP id c1mr23366010pbt.118.1391204926514; Fri, 31 Jan 2014 13:48:46 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si11884139pav.306.2014.01.31.13.48.45; Fri, 31 Jan 2014 13:48:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 S933023AbaAaVsk (ORCPT + 27 others); Fri, 31 Jan 2014 16:48:40 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:41425 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932959AbaAaVsi (ORCPT ); Fri, 31 Jan 2014 16:48:38 -0500 Received: by mail-pd0-f181.google.com with SMTP id y10so4750893pdj.40 for ; Fri, 31 Jan 2014 13:48:38 -0800 (PST) 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-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.128.173 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 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)); } /**