From: Ismael Luceno <iluceno@suse.de>
To: linux-kernel@vger.kernel.org, Simon Horman <horms@verge.net.au>,
Julian Anastasov <ja@ssi.bg>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: "Ismael Luceno" <iluceno@suse.de>,
"Marco Crivellari" <marco.crivellari@suse.com>,
"Federico Pinca" <federico.pinca@suse.com>,
"Andreas Taschner" <andreas.taschner@suse.com>,
"Brad Bendily" <brad.bendily@suse.com>,
"Brendon Caligari" <brendon.caligari@suse.com>,
"Clemens Famulla-Conrad" <cfamullaconrad@suse.com>,
"Firo Yang" <firo.yang@suse.com>,
"Gabriel Krisman Bertazi" <gabriel.bertazi@suse.com>,
"Hans van den Heuvel" <hvdheuvel@suse.com>,
"Jean Delvare" <jdelvare@suse.com>,
"Michal Hocko" <mhocko@suse.com>,
"Michal Koutný" <mkoutny@suse.com>,
"Petr Mladek" <pmladek@suse.com>,
"Petr Tesarik" <ptesarik@suse.com>,
"Richard Thompson" <richard.thompson@suse.com>,
"William Preston" <wpreston@suse.com>, "Yu Xu" <yu.xu@suse.com>,
"Simon Horman" <horms@kernel.org>,
netdev@vger.kernel.org, lvs-devel@vger.kernel.org,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: [PATCH] ipvs: Move defense_work to system_dfl_long_wq
Date: Tue, 17 Mar 2026 15:00:59 +0100 [thread overview]
Message-ID: <20260317140100.24993-2-iluceno@suse.de> (raw)
Under synflood conditions binding defense_work to system_long_wq may
pin it to a saturated CPU.
We've observed improved throughtput on a DPDK/VPP application with
this change. We attribute this to the reduced context switching.
The defense_work handler has no per-CPU data dependencies and no cache
locality requirements that would justify this.
Signed-off-by: Ismael Luceno <iluceno@suse.de>
---
Depends-on: wq/for-7.1 c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
net/netfilter/ipvs/ip_vs_ctl.c | 6 +++---
net/netfilter/ipvs/ip_vs_est.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 35642de2a0fe..948ae5882a70 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -234,7 +234,7 @@ #define DEFENSE_TIMER_PERIOD 1*HZ
update_defense_level(ipvs);
if (atomic_read(&ipvs->dropentry))
ip_vs_random_dropentry(ipvs);
- queue_delayed_work(system_long_wq, &ipvs->defense_work,
+ queue_delayed_work(system_dfl_long_wq, &ipvs->defense_work,
DEFENSE_TIMER_PERIOD);
}
#endif
@@ -273,7 +273,7 @@ #define DEFENSE_TIMER_PERIOD 1*HZ
atomic_set(&ipvs->est_genid_done, genid);
if (repeat)
- queue_delayed_work(system_long_wq, &ipvs->est_reload_work,
+ queue_delayed_work(system_dfl_long_wq, &ipvs->est_reload_work,
delay);
unlock:
@@ -4377,7 +4377,7 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
goto err;
/* Schedule defense work */
- queue_delayed_work(system_long_wq, &ipvs->defense_work,
+ queue_delayed_work(system_dfl_long_wq, &ipvs->defense_work,
DEFENSE_TIMER_PERIOD);
return 0;
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c
index b17de33314da..454ea24828cc 100644
--- a/net/netfilter/ipvs/ip_vs_est.c
+++ b/net/netfilter/ipvs/ip_vs_est.c
@@ -235,7 +235,7 @@ #define pr_fmt(fmt) "IPVS: " fmt
ip_vs_est_stopped_recalc(ipvs);
/* Bump the kthread configuration genid */
atomic_inc(&ipvs->est_genid);
- queue_delayed_work(system_long_wq, &ipvs->est_reload_work, 0);
+ queue_delayed_work(system_dfl_long_wq, &ipvs->est_reload_work, 0);
}
/* Start kthread task with current configuration */
next reply other threads:[~2026-03-17 14:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 14:00 Ismael Luceno [this message]
2026-03-19 16:36 ` [PATCH] ipvs: Move defense_work to system_dfl_long_wq Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317140100.24993-2-iluceno@suse.de \
--to=iluceno@suse.de \
--cc=andreas.taschner@suse.com \
--cc=brad.bendily@suse.com \
--cc=brendon.caligari@suse.com \
--cc=cfamullaconrad@suse.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=federico.pinca@suse.com \
--cc=firo.yang@suse.com \
--cc=fw@strlen.de \
--cc=gabriel.bertazi@suse.com \
--cc=horms@kernel.org \
--cc=horms@verge.net.au \
--cc=hvdheuvel@suse.com \
--cc=ja@ssi.bg \
--cc=jdelvare@suse.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvs-devel@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=mhocko@suse.com \
--cc=mkoutny@suse.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=pmladek@suse.com \
--cc=ptesarik@suse.com \
--cc=richard.thompson@suse.com \
--cc=wpreston@suse.com \
--cc=yu.xu@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox