From nobody Mon Apr 6 17:26:38 2026 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 84B3C3A5E96 for ; Wed, 18 Mar 2026 15:27:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773847682; cv=none; b=YnPDJhRFNM4XLXpKsKePvQLKN6cB1V6cVHcU89BYQdi9wkCKvdplslBNLK1J98XcOqvZNvA0C0b7F8pMjB11WgXNnBN6OfQxuamb2oZKOQTd22KTn0GPjKs94mKWBGmDkqs/n72ncctK+pR1zfXpVdUOjQt3csVkT9NW/sugyVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773847682; c=relaxed/simple; bh=GbZRRh4RoNSGiNCTFjlbY2ucXc50MIoFQsOyq9Oa01k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HcND88FYdbS6hRsvTR7oSqIbzRCzjw7D+Y5s6FJH/Y/w6tPKF4LtdBL10Z5dSMIQFvi33aCjq/LbRyKmAXkweJATbUMg9ZYzAMLKoj48Ai72gb5OwnGxibRsEK2KDlsmoDmgfLIrvCLBUBSeLLopZFEUXEKwPE8kFRW9Nz51R+M= 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=D11s32Qa; arc=none smtp.client-ip=209.85.221.50 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="D11s32Qa" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-43b44c0bcdbso3247129f8f.1 for ; Wed, 18 Mar 2026 08:27:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1773847676; x=1774452476; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=77Y5sebBj+JaxjNi30fFEElZ26WjOo0wU0NWMbSKIuo=; b=D11s32QaVKpvTfD9NT1dKUc3lrrrhRDCW1bWahQaFoQa7lIxRk0kGwhufw6SbjQVVb mOpasD9Oq/i2LiceTysjQlZKr2NpqqFzkpfKGYo3X2wDojp3X22o7bSPBiWGMNafjgS6 YFqlAUVVA2Fwf8zmrqGdVnD6pxSm5prkTiMxA3h4ZtTmgHjk8ZHQ9pgXJPDmXDIidDsj gHjDOEBmKV7l6Dqhkvf+AezSis4mDYbJ1M65glABEdkfdAK9OI7tlW0SDLlVWYneJex/ PtOSyxXc+HvBtkU0DqmVYiXPjgNo17yA/EJXO8Bpz49XJtBROwk8Pklzc2oL5fJ2OAY6 muWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773847676; x=1774452476; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=77Y5sebBj+JaxjNi30fFEElZ26WjOo0wU0NWMbSKIuo=; b=YosVhuIYC7ueAyqRnVnzqb+t24TPosmTZ2hcFAR6g6DROtzuxL2Mni9rnfzFCYfE6Q e0TTNTqk+puJaO51ecQeLIcX2SWhKmM9M+3NAprRxmEjCt+g1ZKWT9EKKcDjCIXM0QRo 6f/4k6SPW9dwl7csR6NmUuTf7XfOve3ZxJjBVX8YR2WhojUEaLrubtV+6j46nno9eg8O b/HbO/Wp1PoaLFjDFMSk2FeJVlwwMUhP+GxND3dIoM7TVUakcyLEQzJXYsCifxlMxYvW RUi5gBviHH0D6l+txtYDiSgSpighVnFs+f1dtA7b2plGpV7jqzPSrKnGi3Wi5qNKrfRC EX3Q== X-Gm-Message-State: AOJu0YxgShvdgT8kmAcJBz7tdg4KQRUP1Y/VmYid7y2myLMqwospvoP8 FZ6E+KsYb1C9oiKhV9A5sbFNB5ZkZ0jgYympckuH0uNNM1d5sj0Q9qMPRh6btViyU2TCRVN8H8h PtAn4 X-Gm-Gg: ATEYQzzxkA33SDOQ+M3oyZzdFPZw8Jvbc1M+JqjF8QygWMS1oO3Ak/8MELYSJc6N3hu +zxmU5Vz5R2E30RsGggTGI2rkMxger9dz/8O2ReqQS8DaI9+6WQm/Nh0RV5L4yOCG+/rtnbNbwb 7TNixnp4ycPeVBz6UpNFu+zK4wYJEZ4woe+yxg99z0ebijGMhvNmW615oaiGXAZCP9TziZ8ls4/ 2mIpj/ubjRoMFnBj12nZzeN5sz9A53WaiUSx9y6W4X+3S5Jw9SdXVm7hj1kRcQUh1QbyoMqwg44 XqECelf2JDnWrBk3oBp/DjN8S8boUqJyFumSVzx3ksnIDK6N5XIrDHJ/qaQP570jPxN0+bqanD3 +Y2teaDBi5kLBxINXGVwMczNB4xrwi84IVmgyX2axQEhJ5Som3282LaXBSFb0aVS9h2prlEiYVv 7nCwIyugifRJUx9ghK0sjtGmoExLT2VHU3AYP4eaHFJO/mkLQ= X-Received: by 2002:a05:6000:288c:b0:43b:3b80:6776 with SMTP id ffacd0b85a97d-43b527c35e6mr6305356f8f.30.1773847676142; Wed, 18 Mar 2026 08:27:56 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b51899617sm9075379f8f.31.2026.03.18.08.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2026 08:27:55 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Zhu Yanjun , Jason Gunthorpe , Leon Romanovsky Subject: [PATCH v2] RDMA/rxe: Replace use of system_unbound_wq with rxe_wq Date: Wed, 18 Mar 2026 16:27:48 +0100 Message-ID: <20260318152748.837388-1-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. This specific driver already allocate an unbound workqueue named "rxe_wq", so replace system_unbound_wq with this one instead of system_dfl_wq. Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- Changes in v2: - use of rxe_wq instead of the new system_dfl_wq. - removed the "static" key from rxe_wq definition making it extern in the header file. --- drivers/infiniband/sw/rxe/rxe.h | 2 ++ drivers/infiniband/sw/rxe/rxe_odp.c | 2 +- drivers/infiniband/sw/rxe/rxe_task.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe.h b/drivers/infiniband/sw/rxe/rx= e.h index ff8cd53f5f28..c56bae376c7f 100644 --- a/drivers/infiniband/sw/rxe/rxe.h +++ b/drivers/infiniband/sw/rxe/rxe.h @@ -121,4 +121,6 @@ void rxe_port_up(struct rxe_dev *rxe); void rxe_port_down(struct rxe_dev *rxe); void rxe_set_port_state(struct rxe_dev *rxe); =20 +extern struct workqueue_struct *rxe_wq; + #endif /* RXE_H */ diff --git a/drivers/infiniband/sw/rxe/rxe_odp.c b/drivers/infiniband/sw/rx= e/rxe_odp.c index bc11b1ec59ac..ff904d5e54a7 100644 --- a/drivers/infiniband/sw/rxe/rxe_odp.c +++ b/drivers/infiniband/sw/rxe/rxe_odp.c @@ -545,7 +545,7 @@ static int rxe_ib_advise_mr_prefetch(struct ib_pd *ibpd, work->frags[i].mr =3D mr; } =20 - queue_work(system_unbound_wq, &work->work); + queue_work(rxe_wq, &work->work); =20 return 0; =20 diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/r= xe/rxe_task.c index f522820b950c..801d06c969c9 100644 --- a/drivers/infiniband/sw/rxe/rxe_task.c +++ b/drivers/infiniband/sw/rxe/rxe_task.c @@ -6,7 +6,7 @@ =20 #include "rxe.h" =20 -static struct workqueue_struct *rxe_wq; +struct workqueue_struct *rxe_wq; =20 int rxe_alloc_wq(void) { --=20 2.53.0