From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) (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 58DB241B37C for ; Wed, 4 Feb 2026 15:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.68 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770220257; cv=none; b=gGrP5LmwpepIDRr8DqwWpE0PqwGzSKH9UL4hvkJtDK+LtbGnsJLZNk4QxCyPYfuqYbitKJmDXkbhQG3YCYpATtPk4j4CQSry/Tr/8M9PgQ9o8wOEligyNX0zQKlc6IW6dlc2qwBMTnhIR/5JAJmsZoo/b1Jv8byA5WsQq1EehtY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770220257; c=relaxed/simple; bh=pf9piQbIKaU/4miTSzQgshVkdz4xFowimaRpgN9zJ+w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=su0+ty6BinrmyOdJXwChA+Gonre4lDM8mSfBDStDQcZlsW+rlkyC7cquyKKRoPTElStqVeWOouPtVfVHS2JeMNl7HCFdOCbOBHbgtTQ7Yg6BH8AyIErkiGpnrFp7cnctNvQcwEhYWtBP6MLoaumde+t4SLEKwSdFqghr9r5gbQA= 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=SC9loFxn; arc=none smtp.client-ip=209.85.128.68 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="SC9loFxn" Received: by mail-wm1-f68.google.com with SMTP id 5b1f17b1804b1-480706554beso77369675e9.1 for ; Wed, 04 Feb 2026 07:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1770220255; x=1770825055; 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=MlEm4vHL6tKPzmv658L2EhVp1N/w5kYHb9cCJLXYzDQ=; b=SC9loFxnahNvsxQZBuK2WKic+QtnFP3HhCWSGAda84h+MhtzA08gVGCL5HjeyKZ6nQ TN7WUmEYJJWCL1pIsPHa8ekr/XQyFSJls1FX+vpITeriRwjZHigMAHMLBMEpYEAQEri0 3WGxu+aFLGVA9dCYb+2ChJZJpbMYDdc3V1zxL9utx2BKwJipWhO6za6W/1GCITrIDZan OKPuTfemspy2ErceUEkPRxFtAcgD7u1hZZv/oPWciTZP3+8EbQPPu2cARjlW1wiL0TU/ Cz6R90UXMtyFFqd/Iexp9a44GmXRbXPKaa/RvXWPowy3t/E0gbg0BG0maVOF/A6o7NaU r0OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770220255; x=1770825055; 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=MlEm4vHL6tKPzmv658L2EhVp1N/w5kYHb9cCJLXYzDQ=; b=wS6SLYWSsg17CMnwzHftWcmSVX7ZwEhRski7/UAB0K6G8cBvJbUwQ7pS0B/39AYdCi jaY36AcKKJLTS+Mt7nIFV07QJV9eA73swvCL/YOLjI1D2c+q4+hwcyFhMW8p+ZTzredY Sx4lSJnpb3T7tvklB+J2qbgKg5YOzdt1qnwbg1msZ1dvbJ/7T/A19fnghh43Bs2PdV9D 1nmExu4Di8PbRrsdWGZGawcvd+k4Kk1Q1moX4UMhePzMRdM1B8lzmBpkM5jODYLmnC+e towIL1Flho2czXM9z4b4LMjTB7PB9wGY9oiXSWT19W/zHbOyExAmBG9PwaW+80rkM6pJ pIkA== X-Gm-Message-State: AOJu0Yxx5ugYshxmyx1HgcwQy8vcaGJOvLkdrR+0+YwDvJ5dvbVpLkNj zzuiVTO2RpLbYhA6peIHdLmT8sw9nPkxjUVyKK7kBmtShk3DAXdE+67OSQv9IoXRGrHxSvivpIY gp79Z X-Gm-Gg: AZuq6aKN82yJG6NrYCLi61xGr6f3dw+nNCWsFVo8ye6KdyHqNpMGaO9QEIo4XWVeAgT 5sNkO4CnQAVwn04C0XFtV/xbnRPgOSg4lt3+KJjJ6dccYE+GMer9Q++0K7kMQNZ9JbEuep51vVL uKQ2MX8u3X6qBtAL6ovAFpPXbhOnwgrZi6GvBMLCUAdLaBI1IRfu5laGAYaJbcsfoez0szO21IC hB39b2hzIUurZ+XtVj20R6Ov6dsqYb0wN8ij7GzWpQnGGz4imI2JrBBwHDlK2j0VqU9m3hjMTze 9vZFuTId/fAo2c/vp95hw3/PD//tqNY6TXfxPvvGm7rOiGD0rK1mjXUU2zjWKWsUF1yiNRoLxIw NSfiBpMk+5nLdKoI68UD/3GA8xdvMGlYaFuextuaXBoEVb5CSK8SqGKPCKr8NW3baJV4pfhRJjN va3HJhhtB8Ot5z X-Received: by 2002:a05:600c:1d04:b0:47e:e946:3a72 with SMTP id 5b1f17b1804b1-4830e979529mr51787765e9.27.1770220255073; Wed, 04 Feb 2026 07:50:55 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 07:50:54 -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 0/2] Add new workqueue wrapper and enqueue on cpu functions Date: Wed, 4 Feb 2026 16:50:35 +0100 Message-ID: <20260204155037.325482-1-marco.crivellari@suse.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi, Recently the workqueue code has been changed introducing two new workqueue, system_percpu_wq and system_dfl_wq, as a future replacement for system_wq and system_unbound_wq respectively. The change has been introduced by: 'commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq")' The old workqueue(s) will be removed in a next release cycle. === Introduced Changes by this series === 1) [P 1] Add wrapper for the new system_dfl_wq - This change introduce two new Rust functions in order to add a wrapper for the new wq(s) defined in the C code. 2) [P 2] Add wrapper for system_percpu_wq and two new functions - The new functions added are enqueue_cpu() and enqueue_delayed_cpu() and are accepting a u32 parameter, the id of the CPU on which the work should be scheduled on. Thanks! --- Changes in v5: - system_dfl() renamed to system_default() - Cover letter v4: https://lore.kernel.org/all/20260203152818.317806-1-marco.crivellari@suse.com/ Changes in v4: - two new function added in the Queue implementation: * enqueue_cpu() * enqueue_delayed_cpu() These functions receive a u32 CPU id in order to schedule work on that CPU. More info can be found in the v3 discussion: https://lore.kernel.org/all/CAAofZF6jcCAdDjRp-7w7+_ZgOG4k3apxbSiKvGoUDVf5hw0GhA@mail.gmail.com/ Changes in v3: - added a proper comment documenting the new added functions. Changes in v2: - added system_percpu() and system_dfl() in order to use the new wq defined in the C code. - fixed misleading paragraph in the commit log (no warnings are currently present). Marco Crivellari (2): rust: add system_default() around the new system_dfl_wq rust: add system_percpu() and per-cpu enqueue functions rust/kernel/sync/completion.rs | 2 +- rust/kernel/workqueue.rs | 110 +++++++++++++++++++++++++++++++-- 2 files changed, 105 insertions(+), 7 deletions(-) -- 2.52.0