From patchwork Thu Jan 30 23:08:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoran Markovic X-Patchwork-Id: 23939 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 07E4F20341 for ; Thu, 30 Jan 2014 23:10:27 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id pa12sf9822562veb.5 for ; Thu, 30 Jan 2014 15:10:27 -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=c5BieAptdPgpQba0s06pViXYkTz/LjwGToYXphSbTyc=; b=kzLPpKWSs7ysb89DshVgTPB3TKVLSlZj7B9DkobZ1des3V27BH0dLoC0mR64EH6Wqr hfP+rx4x33gBDLXEopDG1jqmkEmp9C2+ji9kFRUAGlqu0DEELjqbATU2JIttAiakQqtx JW2M1vvQSudXPUAsEnhUiajPTQ7fmkO53BBC83eSUii0B14Wj6n01bJlwAZq2lwPcAP+ 7lOXhwVvr5ky8nFqGMRGaIIwL2KJlsYe9473wDFJs4N/LaPT3YB0qNsVOawffhJMxEgu csqbiGqacD2naser78ihNedQYvUZgbYbbkni7Ai+odeSLCz5qg6nMBJSXN9p7f47HzZQ 6JtA== X-Gm-Message-State: ALoCoQn3DZM8vXvI2Ym16gxB7raUnuBCtJO1UndL2rVcezO6eN0wk+n2jdYTKewD7vpmHAEk/wUZ X-Received: by 10.58.156.42 with SMTP id wb10mr6667759veb.26.1391123427217; Thu, 30 Jan 2014 15:10:27 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.49 with SMTP id 46ls731134qgq.21.gmail; Thu, 30 Jan 2014 15:10:27 -0800 (PST) X-Received: by 10.58.37.67 with SMTP id w3mr9551356vej.22.1391123427144; Thu, 30 Jan 2014 15:10:27 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id go5si2651568vec.147.2014.01.30.15.10.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 15:10:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id w20so2556852vbb.27 for ; Thu, 30 Jan 2014 15:10:27 -0800 (PST) X-Received: by 10.58.172.132 with SMTP id bc4mr45091vec.45.1391123427038; Thu, 30 Jan 2014 15:10:27 -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 u4csp51412vcz; Thu, 30 Jan 2014 15:10:26 -0800 (PST) X-Received: by 10.67.22.3 with SMTP id ho3mr9752054pad.128.1391123425914; Thu, 30 Jan 2014 15:10:25 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gj4si6052970pac.292.2014.01.30.15.09.55; Thu, 30 Jan 2014 15:09:55 -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 S1753908AbaA3XJu (ORCPT + 27 others); Thu, 30 Jan 2014 18:09:50 -0500 Received: from mail-pb0-f49.google.com ([209.85.160.49]:44879 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753672AbaA3XJs (ORCPT ); Thu, 30 Jan 2014 18:09:48 -0500 Received: by mail-pb0-f49.google.com with SMTP id up15so3716823pbc.36 for ; Thu, 30 Jan 2014 15:09:48 -0800 (PST) X-Received: by 10.68.196.195 with SMTP id io3mr17545423pbc.6.1391123388378; Thu, 30 Jan 2014 15:09:48 -0800 (PST) Received: from vb-linaro.ric.broadcom.com ([216.31.219.19]) by mx.google.com with ESMTPSA id qz9sm21133680pbc.3.2014.01.30.15.09.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 15:09:47 -0800 (PST) From: Zoran Markovic To: linux-kernel@vger.kernel.org Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Shaibal Dutta , Johannes Berg , "John W. Linville" , "David S. Miller" , Zoran Markovic Subject: [RFC PATCH] net: wireless: move regulatory timeout work to power efficient workqueue Date: Thu, 30 Jan 2014 15:08:30 -0800 Message-Id: <1391123310-6425-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.212.54 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 For better use of CPU idle time, allow the scheduler to select the CPU on which the timeout work of regulatory settings would be executed. This extends CPU idle residency time and saves power. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Cc: Johannes Berg Cc: "John W. Linville" Cc: "David S. Miller" Signed-off-by: Shaibal Dutta [zoran.markovic@linaro.org: Rebased to latest kernel. Added commit message.] Signed-off-by: Zoran Markovic --- net/wireless/reg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 9b897fc..6e21011 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1703,7 +1703,8 @@ static void reg_process_hint(struct regulatory_request *reg_request) if (treatment == REG_REQ_OK || treatment == REG_REQ_ALREADY_SET) return; - schedule_delayed_work(®_timeout, msecs_to_jiffies(3142)); + queue_delayed_work(system_power_efficient_wq, + ®_timeout, msecs_to_jiffies(3142)); return; case NL80211_REGDOM_SET_BY_DRIVER: treatment = reg_process_hint_driver(wiphy, reg_request); @@ -2294,7 +2295,8 @@ static int reg_set_rd_driver(const struct ieee80211_regdomain *rd, request_wiphy = wiphy_idx_to_wiphy(driver_request->wiphy_idx); if (!request_wiphy) { - schedule_delayed_work(®_timeout, 0); + queue_delayed_work(system_power_efficient_wq, + ®_timeout, 0); return -ENODEV; } @@ -2354,7 +2356,8 @@ static int reg_set_rd_country_ie(const struct ieee80211_regdomain *rd, request_wiphy = wiphy_idx_to_wiphy(country_ie_request->wiphy_idx); if (!request_wiphy) { - schedule_delayed_work(®_timeout, 0); + queue_delayed_work(system_power_efficient_wq, + ®_timeout, 0); return -ENODEV; }