From patchwork Thu Nov 2 15:16:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 833403 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="PkJBh1Xw"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ySTH63YWhz9sNc for ; Fri, 3 Nov 2017 02:17:54 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933642AbdKBPRx (ORCPT ); Thu, 2 Nov 2017 11:17:53 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:51572 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933418AbdKBPRw (ORCPT ); Thu, 2 Nov 2017 11:17:52 -0400 Received: by mail-wm0-f68.google.com with SMTP id b9so12206531wmh.0 for ; Thu, 02 Nov 2017 08:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=tDcNSiSPs/5nn7E/t1ykyi2b7fU2NWVArSwVJQZ1nJE=; b=PkJBh1XwTcqQmNUbMN2R7Q/bHQG1082DPZQ7g4/jBlHKNhHXms2SXP5pz3HE1KKMau EUCqr8vtvMQopH/5igziRguc5Y7gzKmEi7qYVSSML3xDv2ZOFCO2nAxg4TgExeIEGq2n vLzwOYbiSW1rd6M7Yzuo5nmqRUIgHcP9jYPKM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tDcNSiSPs/5nn7E/t1ykyi2b7fU2NWVArSwVJQZ1nJE=; b=ud9aoULLRgsk2b1NOvLRQp+oqpqXoG+EshUJHqVAX4sLpWh3/webAu6VoUYu42cWN8 CJFVq4gnRIXBLd/KcBYXmDx8Q0kY+kyJtWSYWCWuFrtpLXm0PUqVQUolHAuZ/OcJTI4g ryXic9InFYzykZ77EYQPceTYZxN+89bCJDly4vdvS4j2PBVy0MEBwYOfsGiqOLxZYcq2 b//c6aAbx57jT352aQKAxn0jp8nvx+8BjXKYxJ0tZaV44TvHlYYbKefeqgSlmnNLhCm9 9jACOydC8uu4gVazAbTbeNLM56N/QVRVe3zQIPk304Y3gTWtpkZw1V/P8WalNbznZpTP xieg== X-Gm-Message-State: AJaThX7Oa7osXLVV/igzTTquSIB8VAVNY4fPfpXCpYYB8bYIh9h53V7N Sy6zLKUfwLVqY8aV4W+Qiv9FInUHv0g= X-Google-Smtp-Source: ABhQp+RcPn2QDexOZOmASMJbqbEH4D+5VVu5zVKj9uOnmNWWBpCO5Jwh9G1O7yYV41C2rNVqAxamoA== X-Received: by 10.28.6.6 with SMTP id 6mr2064677wmg.114.1509635871326; Thu, 02 Nov 2017 08:17:51 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:5874:1fff:87d1:2306]) by smtp.gmail.com with ESMTPSA id o7sm3359225wrf.31.2017.11.02.08.17.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Nov 2017 08:17:50 -0700 (PDT) From: Vincent Guittot To: netfilter-devel@vger.kernel.org, pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de Cc: Vincent Guittot Subject: [PATCH] netfilter: conntrack: use power efficient workqueue Date: Thu, 2 Nov 2017 16:16:07 +0100 Message-Id: <1509635767-12253-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org 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 --- net/netfilter/nf_conntrack_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 0113039..ae7d3e4 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) @@ -2084,7 +2084,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;