From nobody Mon Feb 9 04:14:04 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 68F103B8D4B for ; Tue, 3 Feb 2026 15:28:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770132514; cv=none; b=s0dgE8GXqcxd5saBh/b/bV9oY8g6jk+pfNUUw4YsFoARde1qGeoqumiao5kdVN4YeLHFt5BWcN+aIPfUOl2T0/wH9oN253VcmQCCwk9MgZI13CXbJ0KX41FIO4NANROeoXnG1qfxkwPWWIQ1jLP9tyH+CaBA+5Pv7mscMZqB+8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770132514; c=relaxed/simple; bh=VjzLcMYnMGzKi+vu/uescVXSKcvPTOypNKURUrKD0zg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dIDRWv+bJ+eIbygTvWn/2pHRfWFgjrxtu7nQSPkhpiv1sQH0QhuGaaZ9/SHqTBHK0NqPMPvqr7uF7zbB2xfzfGcLSMzI7qZW6ZRxX5I+HWJ9oAAqZnBzWEg1YxXHxUxjb3dvZTmo4StOkBztEdROKKMtp+KGjYDGC0BnsOKj3vs= 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=GQq/6thX; arc=none smtp.client-ip=209.85.128.42 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="GQq/6thX" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4807068eacbso48118595e9.2 for ; Tue, 03 Feb 2026 07:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1770132511; x=1770737311; 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=jptYRhOowxSmX36W8by/N3vMS3FFkCDr4M7jwT5m6nk=; b=GQq/6thXahLRrplzKuyBshQHOLW+RobAKmuZvK2fq3g4wkjHm7zNq+Wdc+RI1G5+y4 d0zSrEC95E32QadKehXxUdTkDRDSRuigqyyD+ylyAkgToyZqMGLxaL2qkAW7EouNF+HA peP6hv5QMHaUN64K+LZ8yvlXByRBgJY3PFu3PDS1aDxjrTrXaiCbL8I+/3dZ1PcL24G7 XSZsiDk2ROGy8tKGN7d3ut1mvsGZ+t5HwydS6mE2+me9lkEAU59DVk7l4FcjQsiO/6op PNXHidwK8qvsDFy0HwxSQ/N4pMiz+fKBGmfq/bhc9ez5Ozoq/XLxxX2s2to7dRqOiEUS 0zNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770132511; x=1770737311; 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=jptYRhOowxSmX36W8by/N3vMS3FFkCDr4M7jwT5m6nk=; b=O34tF4RBxY81xF6k+dGFIuxqxC0WIxYc9HruVdh3MJyKpXFrRtaxSWCereKgwvMgCg OTiWyFP1ytA1bE1Gy4RVc0q+jgQSn84RvI9mqQ3EYvgFrnZMkn99D86kQyMwhknrLJLU rfrs17A+MQu8BB2F3LHlQfyqsOnh7N4JcOZOuOW1zfj37xvvOpcccG+8jUR9XxPT3J8Q BcqdTKuxuVA5hp7eQzgEcljo4D6MqNzafS4ISwQuIc2CyteRvtw51fdp5ErZGA94xfy3 0aJvHXg7Pxwd906UvBM7s4CrAzLBnO2IoV22aSLoPPz7+YZHNRQC8baOd6yvqB+SbAtU F9iA== X-Gm-Message-State: AOJu0YwkHQ/AQEYjvR2OKE8+Z0s1kbU0oKYhvnoiDZwUnwF242hXO3IJ LLD2+IicHLa8m9bHwR0451tffyVX5BO3Qmvs9Ky4dl5Ngjl3IXxUOEtbJD6lSkllI2iTzIsRwrJ wVSan X-Gm-Gg: AZuq6aKhudH73ctxa+DDX1mSJcaP1CcWUUEqquSBL6n71xwv10/qsiyGXW8DbM9VP4a SakVZIiriT/DlpddiP8IKawu1DXCPTfQZvGw/H4d0zzt7+chWJSiGj6vfBe+L7J8ctTwEuZGXb2 b15w4uhh3Hz9fD6alfTW8J3Fg2jB3dHzyu4XXNS8Hn0OaA59QLCxEB4YNkApur0+ZghVpWsEuiA kQVTWtUBzNmwv2jfXq1baJKPSpcctnHjUZ3SKMWJ7TwOf0R5CXn/A1NliS0dyzo6Kb62OlJ0r5l KMHKTA/a+W5o5UjYPUlmq3FGh/RNpscjdENJFdXuA7kXenjtkKS1MUDWwDlUi5/JwsQ671ZVjxo tbecMmbjXrhDcy5h31NupQynT/aP/0cbzeK79YOAR9WMDY7fEUd7garL8kKezBfHweGXym3acaY 8Vl2v9syA223ExYjnszRgJxZIilX5TRr+dKR5A X-Received: by 2002:a05:600c:5491:b0:480:46c6:bf4b with SMTP id 5b1f17b1804b1-4830e92a73bmr467905e9.5.1770132511405; Tue, 03 Feb 2026 07:28:31 -0800 (PST) Received: from linux.fritz.box ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483050dd79fsm71316005e9.0.2026.02.03.07.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Feb 2026 07:28:31 -0800 (PST) From: Marco Crivellari To: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Miguel Ojeda , Alex Gaynor , Alice Ryhl Subject: [PATCH v4 1/2] rust: add system_dfl() around the new system_dfl_wq Date: Tue, 3 Feb 2026 16:28:16 +0100 Message-ID: <20260203152818.317806-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260203152818.317806-1-marco.crivellari@suse.com> References: <20260203152818.317806-1-marco.crivellari@suse.com> 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" The C code defines 2 new workqueues: system_percpu_wq and system_dfl_wq, respectively the futures replacement for system_wq and system_unbound_wq. This change introduce system_dfl(), that use the new system_dfl_wq. system_unbound_wq will be replaced in a future release cycle and should not be used. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo --- rust/kernel/workqueue.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index 706e833e9702..300cc2bfe012 100644 --- a/rust/kernel/workqueue.rs +++ b/rust/kernel/workqueue.rs @@ -968,11 +968,25 @@ pub fn system_long() -> &'static Queue { /// Workers are not bound to any specific CPU, not concurrency managed, an= d all queued work items /// are executed immediately as long as `max_active` limit is not reached = and resources are /// available. +/// +/// Note: `system_unbound_wq` will be removed in a future release cycle. U= se [`system_dfl_wq`] instead. pub fn system_unbound() -> &'static Queue { // SAFETY: `system_unbound_wq` is a C global, always available. unsafe { Queue::from_raw(bindings::system_unbound_wq) } } =20 +/// Returns the system unbound work queue (`system_dfl_wq`). +/// +/// Workers are not bound to any specific CPU, not concurrency managed, an= d all queued work items +/// are executed immediately as long as `max_active` limit is not reached = and resources are +/// available. +/// +/// Note: `system_dfl_wq` will replace in a future release cycle [`system_= unbound_wq`]. +pub fn system_dfl() -> &'static Queue { + // SAFETY: `system_dfl_wq` is a C global, always available. + unsafe { Queue::from_raw(bindings::system_dfl_wq) } +} + /// Returns the system freezable work queue (`system_freezable_wq`). /// /// It is equivalent to the one returned by [`system`] except that it's fr= eezable. --=20 2.52.0