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: 3559741 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 43DF19F39E for ; Thu, 30 Jan 2014 23:10:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7484920117 for ; Thu, 30 Jan 2014 23:10:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E8BD201C7 for ; Thu, 30 Jan 2014 23:09:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753906AbaA3XJu (ORCPT ); Thu, 30 Jan 2014 18:09:50 -0500 Received: from mail-pb0-f48.google.com ([209.85.160.48]:63372 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753819AbaA3XJs (ORCPT ); Thu, 30 Jan 2014 18:09:48 -0500 Received: by mail-pb0-f48.google.com with SMTP id rr13so3728041pbb.35 for ; Thu, 30 Jan 2014 15:09:48 -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=NQCFYGy1H5DJltdMuGlSb43du19tiAUC/Q8J+UYRDzk=; b=b0KtAPcgVDsosrvo/1vWIjdEEzoyODSXJHDeR7b0qWyEVIAZRvPchBcpXC4UgmJvPQ B5pRM4QG/qXGWdXhLtJszcOStWZKloHNgqrObkb8Ri+QGTfku+fX5hUOcs+ZsNZLHxN4 GhKjDbxHCjxdUGPZgXYM0mq077wdKMgPL8yP3rNDcKxPDSI29uYm0ybTO1MAnvgZ5gBl U0FAAqhrqpXfGaT4OWqf0buXU2nDTVULBW8Y2GRzqK1SALJzmViEHdMaaEMdTnLVLmgo rUiyFEjzhDSEV1P37x2xGn4vdktV5NMkiYTJ/GuU/WaAOxAZC0D7V/yRbH++LaAYOLQr 9T/g== X-Gm-Message-State: ALoCoQnsduB7fShweyTq5adatqeUl1WfrqtJKu9iSNk9FrfZCoeIdCjqK59o11txi+/PN6bgs42H 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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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; }