From patchwork Thu Jan 30 23:40:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoran Markovic X-Patchwork-Id: 23940 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AD2C3202B2 for ; Thu, 30 Jan 2014 23:41:16 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id ar20sf13388984iec.5 for ; Thu, 30 Jan 2014 15:41:15 -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=dTl6qKk4wJPgVlNhRYMbVVh4WL0k2mqyuvPx7gTffB4=; b=jqAQpUFlhGmLy5u6e9OqSFFA7Un/veuPpWwQ2HWiMwNVNxJfRXYancwtBZ2kW4SSSY djUneZCNzDVoly6Ll/4ZR1xs3I8g3BZc1WfGQnLB3dJ1ZamkUUvRfpJtdhH3o5mMWLEu 9FdB9e7mb7CdasHnue2yHeCLAqgA2qIZPwPCxWQP3oHveQE3OjE1pUn1HaHfgwXgiG35 /KEdkN1TfAOKEV+arUVAGFhfTHdLcMlaa5p48CoPL49qxwtXLZXZpBBVqfRVtyb16z4O QUa+TfpOkLljtkHmz3tr7F+NSAVmz0Pb4xm4WmjUaBLMWNRGCmp8QRZNj60QhWrwIkmF YY5g== X-Gm-Message-State: ALoCoQke8GnctobGE1Th6rKLr+MgYASSDK1Ds8THEGPGIgUbdjYzntkBP4dF9lb8DEQ3NPp+gwKf X-Received: by 10.182.34.169 with SMTP id a9mr6579412obj.49.1391125275746; Thu, 30 Jan 2014 15:41:15 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.134 with SMTP id v6ls641868qgv.36.gmail; Thu, 30 Jan 2014 15:41:15 -0800 (PST) X-Received: by 10.52.181.199 with SMTP id dy7mr122488vdc.43.1391125275603; Thu, 30 Jan 2014 15:41:15 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id sl9si2688909veb.97.2014.01.30.15.41.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 15:41:15 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.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.128.181; Received: by mail-ve0-f181.google.com with SMTP id cz12so2614101veb.26 for ; Thu, 30 Jan 2014 15:41:15 -0800 (PST) X-Received: by 10.220.99.7 with SMTP id s7mr13894649vcn.19.1391125275446; Thu, 30 Jan 2014 15:41:15 -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 u4csp52976vcz; Thu, 30 Jan 2014 15:41:14 -0800 (PST) X-Received: by 10.66.164.229 with SMTP id yt5mr17539451pab.67.1391125274533; Thu, 30 Jan 2014 15:41:14 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wm3si8233273pab.136.2014.01.30.15.40.44; Thu, 30 Jan 2014 15:40:44 -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 S932069AbaA3Xkj (ORCPT + 27 others); Thu, 30 Jan 2014 18:40:39 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:60493 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753097AbaA3Xkh (ORCPT ); Thu, 30 Jan 2014 18:40:37 -0500 Received: by mail-pa0-f54.google.com with SMTP id fa1so3781521pad.27 for ; Thu, 30 Jan 2014 15:40:37 -0800 (PST) X-Received: by 10.66.222.234 with SMTP id qp10mr17430209pac.156.1391125236921; Thu, 30 Jan 2014 15:40:36 -0800 (PST) Received: from vb-linaro.ric.broadcom.com ([216.31.219.19]) by mx.google.com with ESMTPSA id xv2sm21266862pbb.39.2014.01.30.15.40.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 15:40:36 -0800 (PST) From: Zoran Markovic To: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org, Shaibal Dutta , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Zoran Markovic Subject: [RFC PATCH] net: ipv4: move inetpeer garbage collector work to power efficient workqueue Date: Thu, 30 Jan 2014 15:40:13 -0800 Message-Id: <1391125213-8119-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.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 Garbage collector work does not have to be bound to the CPU that scheduled it. By moving work to the power-efficient workqueue, the selection of CPU executing the work is left to the scheduler. This extends idle residency times and conserves power. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: James Morris Cc: Hideaki YOSHIFUJI Cc: Patrick McHardy Signed-off-by: Shaibal Dutta [zoran.markovic@linaro.org: Rebased to latest kernel version. Added commit message.] Signed-off-by: Zoran Markovic --- net/ipv4/inetpeer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index 48f4244..87155aa 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c @@ -161,7 +161,8 @@ static void inetpeer_gc_worker(struct work_struct *work) list_splice(&list, &gc_list); spin_unlock_bh(&gc_lock); - schedule_delayed_work(&gc_work, gc_delay); + queue_delayed_work(system_power_efficient_wq, + &gc_work, gc_delay); } /* Called from ip_output.c:ip_init */ @@ -576,7 +577,8 @@ static void inetpeer_inval_rcu(struct rcu_head *head) list_add_tail(&p->gc_list, &gc_list); spin_unlock_bh(&gc_lock); - schedule_delayed_work(&gc_work, gc_delay); + queue_delayed_work(system_power_efficient_wq, + &gc_work, gc_delay); } void inetpeer_invalidate_tree(struct inet_peer_base *base)