From nobody Mon Feb 9 13:37:14 2026 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) (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 4F042421883 for ; Wed, 4 Feb 2026 15:50:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.67 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770220258; cv=none; b=KVBfIGqfGfYxobh9OfIcgFThBfzO7PHw1lvrxa+Z9SULLmuIHCLmibgiYUvd79AvbMh57Z1O0f1Fh2oueZBrKvaPOkaqc1NsAu6Hn9rl+MW4ZLxL0ZQgtxEq96rPyLxJhUHaBwzvi+SdbPcJTXXMFATUTjOh7Ogc/mEhTwHNSH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770220258; c=relaxed/simple; bh=so9g/9Fhc/PnB/Oc41ncP75JhzHK9HwO8kVevup0eEw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KbJU/HeushsoLnF5udZECor3ojoSxvufltOS01HQ/6Il+SoN0IOOjFSVCGOLf/GtXtoAn2iFN0lJWDCWiIvrSciTigUYcq3MJM3Oq8E/weo5w+/yobWKm9/z33Q5JkZD3tEok6zI4d0pTsZ0MJBigMNbrjjbMy6/rZ3/M9roUak= 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=IjXODi/M; arc=none smtp.client-ip=209.85.128.67 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="IjXODi/M" Received: by mail-wm1-f67.google.com with SMTP id 5b1f17b1804b1-47ee76e8656so94693455e9.0 for ; Wed, 04 Feb 2026 07:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1770220256; x=1770825056; 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=uT/xyZK4EJ/ek5utcqcmzn3TDnBpie0X0xrxkYJsyXI=; b=IjXODi/MB/Gm02Zeex7kWOOiYJqL3hfs51bPVGVLE+9eVxEKwyoQxvrPcbY54EPwar /wQSjJLcd5KH6f4bi93uSUnICvLAoZvwA5ZJCSRI6UJeWqVfdmdlgkmikPg5dyRh0ckb BjSZz13T/5tndXFhM91XDryN1un5MusRgcIlabzunMPJQ1nRd/QjRTdBfdc7M/lenbwO 2wEG9Y9XfhlY+jE9J4wpUbXCop2HJGU68SKxSGZY5vDYWXpsE05YVszSnPu4oBB6XpP+ wZmRjDkRJptP6Ee2JD5MKHTdEOwOrlr8hPKkxiWIDqV4W+xFD9an1QAAuwdfI3IxXQQu WV8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770220256; x=1770825056; 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=uT/xyZK4EJ/ek5utcqcmzn3TDnBpie0X0xrxkYJsyXI=; b=fzyfKmV8ryzjrE0tWACy8aOvHVw85uJrDC46W6kieKY6oiBbGNcrji6FoeT8/tdag/ VYQPLzWr+9+XWf60GZeMAo8to33JGBFDMSjW66hCvwdgRmsbNZ23FZ6hDBP1MWlCXa+g Us1BnHnZFXI/lAfJrx+3OGF7RSuijkDWwFq3xkAAPwb2ruqWDsB6fbwfOnQVtOodUNv0 5NvtjfAdPGwDHcQjYdV/LKr3Fqf1PLp10F1yBaf+RJ94NFrukLSqUQQXC3lp5tGZCG5H wvsqlNmPTiedQ8hB5YXWIAPKOhbAz4GxlkvseP16CJUep6ag2Ho6+f6hhToJn8dLfQ2p mp5g== X-Gm-Message-State: AOJu0Ywbyc/bJiD+q9MnN+a16+qkNLor6FRaxrfVh00k7CJF7Ghena36 uMVsDYUOY/4h5RldyXt0N9tWD3u0rD0Vw0omrJUxOUaV69KZlPhiZEB1hixFHjOrStMMrWlfkWi 96lTl X-Gm-Gg: AZuq6aLVLz1+HxoRejT2s9B9n6tSeWN5s388VZDmq1qLLpEYOU4oq2J/5tl38N5XlYz TtZlzQ4W+oV9AM2h+PxMooszNtclP8jS3SmXLFCZN6NJand6jYTcPF/g/7/jqjNM7GnzWAGOuBA MAF3rNkaqUWhBrIrEx8YToWZE+umQrfaP4DR2/Ur4+2yUWAtgZgPfDjeaHjNhFUW110JySX4SjM P8GF8dfTNjeF9sFPXlFyeiTf79euyof7riNHkUQ2qbyxo9LIrIhMWM68OZXBzj2mOXgxQ15Ei8/ LmnIe2zNmN87GUAD0v2Lem1wuEnCgaNGMVu1WL5/dALXBGjIZLMfj5tU2NGbSivxsGGoqRmB1xd sHaX1EzP77u53C3klPRnsIXTiH6mfOpyLkcHJW5GFMS78WLGx9eKzeyYTJpDdv4EOpkuScWmBo0 unqnovwIfGfLSc X-Received: by 2002:a05:600c:810b:b0:480:4a90:1af2 with SMTP id 5b1f17b1804b1-4830e979f7bmr45721295e9.35.1770220256456; Wed, 04 Feb 2026 07:50:56 -0800 (PST) Received: from linux ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483107e62d6sm51879535e9.0.2026.02.04.07.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 07:50:56 -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 v5 1/2] rust: add system_default() around the new system_dfl_wq Date: Wed, 4 Feb 2026 16:50:36 +0100 Message-ID: <20260204155037.325482-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260204155037.325482-1-marco.crivellari@suse.com> References: <20260204155037.325482-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_default(), 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 --- rust/kernel/workqueue.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index 706e833e9702..adbecdb2b3a9 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_u= nbound_wq`. +pub fn system_default() -> &'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