From patchwork Tue Nov 7 00:52:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 118100 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3380478qgn; Mon, 6 Nov 2017 16:53:53 -0800 (PST) X-Google-Smtp-Source: ABhQp+RpwKXgMnDftDWQDu0pQDgy2wsqeixRkTxz6LZNSGVnkDyiQ7r6tznvHKoA/zqKu5QD0ghW X-Received: by 10.101.72.65 with SMTP id i1mr16873182pgs.436.1510016033363; Mon, 06 Nov 2017 16:53:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510016033; cv=none; d=google.com; s=arc-20160816; b=FNhspjm6/36oqGyDduIcuqbP3O5mlpUKC4+sD4/b5lBsIjAb1+IoLX4eyGnfj/nfiD KEi5hw/C+KIymDH/kacsR7bIcwikJ5EsVd8khUm4pNzplv1CUmedMlr2dlCZozvpMKmp z5YnsCabQl5aKTvZiII/QlpFDeipmXGATIDjAtOgge9rrMiABJgm2F732iCGXCWAtaL1 Sq4iz10bPMuQJ85hfseh5VWhs4LQFxRH3/OkiCCp3iy+cCRAaf599NDem/2YAwHqmYOd aNrXibAho5GsCN6O21gs+6V+XKCZ8sg6NCE8Mj98Q15DAoR5/zTxZ1CpDmwNyPKmQFih SO/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=NiXKrN327O1xfj16ANsN2tJaibm/dGr7SNWov1mzwcA=; b=Sq1W6OkOcLg+8qhRgzD6XdKH29NxhHEA+Pyua9BI2BWogUlxm79pYvMcY8Sx7TZaP/ o6GB96MsXt1IuL717HJDEIYpt/MYAJLdBx4VQskdPBWY1XIMtCZA6hxT2NKR6ZwO9nRl 4lfbMVUE4WUMjR2VsolhlXlW/XQg7mIFVT1dlId7WRCSp/8KFkb5YIg+HMgVt26N577d fs1ifhZ2i+a5XDv/qw0gNiSCZYlUq9TO2ohj43EgO6iDnohXVK6gJMU4rvcgQRxCKBfu lsfvzTZLTWGe1GPGpBRIcgNPfITN57FbrxPlQ4AMomMGe23jMf5sJU5CeOdzGM/8pZkS PvPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92si20920plw.30.2017.11.06.16.53.53; Mon, 06 Nov 2017 16:53:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964950AbdKGAxv (ORCPT + 7 others); Mon, 6 Nov 2017 19:53:51 -0500 Received: from mail.us.es ([193.147.175.20]:59106 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964947AbdKGAxt (ORCPT ); Mon, 6 Nov 2017 19:53:49 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 8FA781F4B70 for ; Tue, 7 Nov 2017 01:53:47 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 7DEC1DA81E for ; Tue, 7 Nov 2017 01:53:47 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 73A4EDA80B; Tue, 7 Nov 2017 01:53:47 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on antivirus1-rhel7.int X-Spam-Level: X-Spam-Status: No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50, SMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1 Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 619D1DA80B; Tue, 7 Nov 2017 01:53:45 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Tue, 07 Nov 2017 01:53:45 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from salvia.here (unknown [61.40.109.130]) (Authenticated sender: pneira@us.es) by entrada.int (Postfix) with ESMTPA id 040F6404FD19; Tue, 7 Nov 2017 01:53:42 +0100 (CET) X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Cc: davem@davemloft.net, netdev@vger.kernel.org Subject: [PATCH 21/23] netfilter: conntrack: use power efficient workqueue Date: Tue, 7 Nov 2017 01:52:11 +0100 Message-Id: <20171107005213.22618-22-pablo@netfilter.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171107005213.22618-1-pablo@netfilter.org> References: <20171107005213.22618-1-pablo@netfilter.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vincent Guittot conntrack uses the bounded system_long_wq workqueue for its works that don't have to run on the cpu they have been queued. Using bounded workqueue prevents the scheduler to make smart decision about the best place to schedule the work. This patch replaces system_long_wq with system_power_efficient_wq. the work stays bounded to a cpu by default unless the CONFIG_WQ_POWER_EFFICIENT is enable. In the latter case, the work can be scheduled on the best cpu from a power or a performance point of view. Signed-off-by: Vincent Guittot Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_conntrack_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 0e516947c16f..5749fcaa2770 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -1083,7 +1083,7 @@ static void gc_worker(struct work_struct *work) next_run = gc_work->next_gc_run; gc_work->last_bucket = i; gc_work->early_drop = false; - queue_delayed_work(system_long_wq, &gc_work->dwork, next_run); + queue_delayed_work(system_power_efficient_wq, &gc_work->dwork, next_run); } static void conntrack_gc_work_init(struct conntrack_gc_work *gc_work) @@ -2089,7 +2089,7 @@ int nf_conntrack_init_start(void) goto err_proto; conntrack_gc_work_init(&conntrack_gc_work); - queue_delayed_work(system_long_wq, &conntrack_gc_work.dwork, HZ); + queue_delayed_work(system_power_efficient_wq, &conntrack_gc_work.dwork, HZ); return 0;