From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 983F93F65F9 for ; Mon, 11 May 2026 13:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778507294; cv=none; b=mW63d7XFeCdHlObMwTl88+1SmoE9cqQWCX32I3fkLMHP8uBJkh4vCwYG5EowEL3OanntBSyUKtHc5BFdOj/LqEdzNL0/SaTTRiZGxd5RcziF4e4QaP5FMlIs844yjloErBUjTH4HVK6icWA9V2WDZ5KcuDRTPN7zFPRWHAGmsLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778507294; c=relaxed/simple; bh=5lTw8AW4wHd4EwAFkjJzid9ifnmy2d8f+Nyohbx8bF8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mF09zW75c4wjiYsRPs7Aqx06U4WNbul5aJQZyfslV2JUFDuwJ+gNpBtK+esrBeMnyUjdfwT+X0ckq2Bm1z24WXRftvOgaSBiRe/JaDEiZ9yuVC4RRhtA23ucA/roia2JbSJz23zkCFSh/8JjluOqsSmkTkA/JlHTuaECGhTT4sM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=fdvpZ34P; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="fdvpZ34P" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-48a3e9862f0so29017985e9.1 for ; Mon, 11 May 2026 06:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778507290; x=1779112090; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5jEKdOT9KNT9VkfLURxJrQMx5JuEqo+lpwOnRqNvfvY=; b=fdvpZ34PGkii73OrZ3bKD/2ykJ93QnGL42dlkoCxkXvZPfHQ+BxaVd1wK+uuA1S2KC Y4rYShGIkkbz0UGs2T9fcVtKQYeoAu+JzCxdLsFoszsLi2mXeVMuCzCbqCj5kzKenXvo nD7bPdh7Qwnl08pcWrrKIqXCXrEgTAyh6wEGG6f1G7b2MXMoRwGEGEe3zBHGRvhi2Zke nAHhggyHw58OYe5xwrMxrqKgPXECZASfhLk/23/ygeNy1IqIsb9f78qjthT5RoLVOwWT fiad8cf/Oj0ZdfKB6+G7qQtwRijuU7ZblE1Xr0VzkUWNlniao1JxMhaqqqVk3hQGjEAt vf4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778507290; x=1779112090; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5jEKdOT9KNT9VkfLURxJrQMx5JuEqo+lpwOnRqNvfvY=; b=KX/0oAletAPIMYDzRdnp4fp3Pzf5NuRt71lV/StSq1CVaLqrC6gSCJoGygXpO2HcZi IhXGNB8eRDOYl+a1P2WzFMhFpWHxHlCmThYIXZAIwj5Y9D2ZR3bMxN4PFi6ZdvMNypli B8HsEvUGbb2eGhm8D82ch3vXflzUeA/PD7BAG7yk31wlWMIO7t6STLM15yY9MMe/ScwR NGY1lq1n3ZWDiRN8JCiXLdqTsGWYq2xg5285lWqbYJ3u4zRPS3OV7MfUCwkOwKE3skU6 519KFTuOONJv4EeJgQvSyDVdRl/vk1z1g3bzJYTHebuDYN40Wp2+9Z0pkWmRDIaDTBRc r/dQ== X-Forwarded-Encrypted: i=1; AFNElJ8685IlAjbbShZbjRYs4FDPcCkvwIEmuLbrar0USTfgJ4IXtH+jcSYWTqscmkMizm2U5bMmWwc=@vger.kernel.org X-Gm-Message-State: AOJu0Ywb4sRqCX3wyhDW6snPon5C5RKJTpKMUsRVzGsjshiuq2JAkI8p KA1DfUlK+9uICDSkRj86D6d8Vc8gwJpSBW93WBIdZlFNAHXJfxXUh1dkUM9J7KZRQko= X-Gm-Gg: Acq92OEryytjW6hm0zUC9cAx6W0ORwbGmqp8GFTdQ94FiAaOU5oY5uNk+Nyu9SMF3bl zhMpIzL1XoREfOud/vB+AFv+R60EPiSkcbSFfrkTP75yO+K7Ew+mo9VAGDLkiWo4y6YY2Bdzdww E/e7rndWgQrXXblXwcVWWL0o6/g/HNVXVKOL+bDw2NpLaC+730VyFAX2wxOQVTlxniuQLhQz1Gc aBc2xGtikadWQwG379Wa7aqtQDuU1lmBA0NNDB3PbzJYHiyOShKkfy3YW/bAVz6JV6LrUCBPsCR zOEiFaiKAoUIcwqd0Rzwhiu+XXMfPaE9lQh4yG9vl0ZF+e7mjjUvra8PZkc+TfC7XzTYLbRdtI7 W+GzEL2ByquEqAA3ovhk4hIdRxmtMBJTdU3kkRzKO7gwMooSuWAT/mY39FFKzmyRmemSnJkV+B5 852dGCnZP+4RYsdIPgZxHG3EXabV3UOmEvaKIzOw+/aimmaL8= X-Received: by 2002:a05:600c:3b8f:b0:48a:79d8:a8d6 with SMTP id 5b1f17b1804b1-48e642deefamr241378475e9.7.1778507289999; Mon, 11 May 2026 06:48:09 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e701e957asm188062665e9.6.2026.05.11.06.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 06:48:09 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Simon Horman , Eric Dumazet , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Julian Anastasov , Pablo Neira Ayuso , Florian Westphal , Phil Sutter , lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org Subject: [PATCH net-next 2/2] ipvs: Replace use of system_unbound_wq with system_dfl_wq Date: Mon, 11 May 2026 15:47:37 +0200 Message-ID: <20260511134744.277032-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511134744.277032-1-marco.crivellari@suse.com> References: <20260511134744.277032-1-marco.crivellari@suse.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch continues the effort to refactor workqueue APIs, which has begun with the changes introducing new workqueues and a new alloc_workqueue flag: commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") The point of the refactoring is to eventually alter the default behavior of workqueues to become unbound by default so that their workload placement is optimized by the scheduler. Before that to happen, workqueue users must be converted to the better named new workqueues with no intended behaviour changes: system_wq -> system_percpu_wq system_unbound_wq -> system_dfl_wq This way the old obsolete workqueues (system_wq, system_unbound_wq) can be removed in the future. Cc: Julian Anastasov Cc: Pablo Neira Ayuso Cc: Florian Westphal Cc: Phil Sutter Cc: lvs-devel@vger.kernel.org Cc: netfilter-devel@vger.kernel.org Cc: coreteam@netfilter.org Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- net/netfilter/ipvs/ip_vs_conn.c | 4 ++-- net/netfilter/ipvs/ip_vs_ctl.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 9ea6b4fa78bf..2625c0379556 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -285,7 +285,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp) /* Schedule resizing if load increases */ if (atomic_read(&ipvs->conn_count) > t->u_thresh && !test_and_set_bit(IP_VS_WORK_CONN_RESIZE, &ipvs->work_flags)) - mod_delayed_work(system_unbound_wq, &ipvs->conn_resize_work, 0); + mod_delayed_work(system_dfl_wq, &ipvs->conn_resize_work, 0); return ret; } @@ -916,7 +916,7 @@ static void conn_resize_work_handler(struct work_struct *work) out: /* Monitor if we need to shrink table */ - queue_delayed_work(system_unbound_wq, &ipvs->conn_resize_work, + queue_delayed_work(system_dfl_wq, &ipvs->conn_resize_work, more_work ? 1 : 2 * HZ); } diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index c7c7f6a7a9f6..f8fe1c8981d8 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -800,7 +800,7 @@ static void svc_resize_work_handler(struct work_struct *work) if (!READ_ONCE(ipvs->enable) || !more_work || test_bit(IP_VS_WORK_SVC_NORESIZE, &ipvs->work_flags)) return; - queue_delayed_work(system_unbound_wq, &ipvs->svc_resize_work, 1); + queue_delayed_work(system_dfl_wq, &ipvs->svc_resize_work, 1); } static inline void @@ -1833,7 +1833,7 @@ ip_vs_add_service(struct netns_ipvs *ipvs, struct ip_vs_service_user_kern *u, /* Schedule resize work */ if (t && ip_vs_get_num_services(ipvs) > t->u_thresh && !test_and_set_bit(IP_VS_WORK_SVC_RESIZE, &ipvs->work_flags)) - queue_delayed_work(system_unbound_wq, &ipvs->svc_resize_work, + queue_delayed_work(system_dfl_wq, &ipvs->svc_resize_work, 1); *svc_p = svc; @@ -2078,7 +2078,7 @@ static int ip_vs_del_service(struct ip_vs_service *svc) } else if (ns <= t->l_thresh && !test_and_set_bit(IP_VS_WORK_SVC_RESIZE, &ipvs->work_flags)) { - queue_delayed_work(system_unbound_wq, &ipvs->svc_resize_work, + queue_delayed_work(system_dfl_wq, &ipvs->svc_resize_work, 1); } return 0; @@ -2511,7 +2511,7 @@ static int ipvs_proc_conn_lfactor(const struct ctl_table *table, int write, } else { WRITE_ONCE(*valp, val); if (rcu_access_pointer(ipvs->conn_tab)) - mod_delayed_work(system_unbound_wq, + mod_delayed_work(system_dfl_wq, &ipvs->conn_resize_work, 0); } } @@ -2543,7 +2543,7 @@ static int ipvs_proc_svc_lfactor(const struct ctl_table *table, int write, READ_ONCE(ipvs->enable) && !test_bit(IP_VS_WORK_SVC_NORESIZE, &ipvs->work_flags)) - mod_delayed_work(system_unbound_wq, + mod_delayed_work(system_dfl_wq, &ipvs->svc_resize_work, 0); mutex_unlock(&ipvs->service_mutex); } -- 2.54.0