From patchwork Fri Jan 31 18:48:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoran Markovic X-Patchwork-Id: 23988 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 35BE8202FA for ; Fri, 31 Jan 2014 18:49:19 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id gq1sf17062761obb.4 for ; Fri, 31 Jan 2014 10:49:19 -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=cKLjaK3rjyiPEYWvoVDLR4XxUPTSGBB6F4VbYyN17Lk=; b=OZcp7zJ4bBdM3ebqunwKuF9jCmXwTJVMWc/U5BC3w/ak+/xkjzVK1FSlR4iAqSjz14 NBLjSe73ORuH8gAPc1yTR5D1huE5bYUlXLBpA920Z8bxLQJ1NX0AETsx2rZs8+eucjQZ CvTylNaH3RkQt+WuXcbK3R6pYXMIjfSAi9T2Xw8lQTch8kfQt2H9OF2acmqE/FugLL4y 5QBBGVKnkvMYNJvPcrp10rWIeb1r+sOoR9dpU5pKDHFDVP/RtCSW69rGvqXVB98/QjYD zGN5qPXZzD4duLI4UctqTrkHmx8NFGG3RTcel/6tvuJG98aMVtrP297Ji6Ct7PqaFwP9 09Bw== X-Gm-Message-State: ALoCoQmI8ks2MY7DtQc44dMzUGicfd/cjuvd4xKpG1WFIG2pwpAM+fz9FaWZSiP8Tz6baD9qXFwu X-Received: by 10.50.253.196 with SMTP id ac4mr15892igd.6.1391194158985; Fri, 31 Jan 2014 10:49:18 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.49 with SMTP id v46ls1090025qge.6.gmail; Fri, 31 Jan 2014 10:49:18 -0800 (PST) X-Received: by 10.52.97.230 with SMTP id ed6mr300220vdb.64.1391194158868; Fri, 31 Jan 2014 10:49:18 -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 ja16si3821906vec.12.2014.01.31.10.49.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 10:49:18 -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 w20so3277987vbb.27 for ; Fri, 31 Jan 2014 10:49:18 -0800 (PST) X-Received: by 10.58.243.3 with SMTP id wu3mr286554vec.12.1391194158777; Fri, 31 Jan 2014 10:49:18 -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 u4csp118063vcz; Fri, 31 Jan 2014 10:49:18 -0800 (PST) X-Received: by 10.68.136.162 with SMTP id qb2mr22675285pbb.88.1391194157641; Fri, 31 Jan 2014 10:49:17 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nf8si11471189pbc.240.2014.01.31.10.49.16; Fri, 31 Jan 2014 10:49:16 -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 S932741AbaAaStJ (ORCPT + 27 others); Fri, 31 Jan 2014 13:49:09 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:38485 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932481AbaAaStH (ORCPT ); Fri, 31 Jan 2014 13:49:07 -0500 Received: by mail-pa0-f51.google.com with SMTP id ld10so4769966pab.38 for ; Fri, 31 Jan 2014 10:49:07 -0800 (PST) X-Received: by 10.69.0.39 with SMTP id av7mr22370492pbd.4.1391194146894; Fri, 31 Jan 2014 10:49:06 -0800 (PST) Received: from vb-linaro.ric.broadcom.com ([216.31.219.19]) by mx.google.com with ESMTPSA id qz9sm30005856pbc.3.2014.01.31.10.49.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 10:49:06 -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 PATCHv2] net: ipv4: move inetpeer garbage collector work to power efficient workqueue Date: Fri, 31 Jan 2014 10:48:07 -0800 Message-Id: <1391194087-12195-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 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. Fixed code alignment.] 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..7e3da6c6 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)