From mboxrd@z Thu Jan 1 00:00:00 1970 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 73D1C3B8BDF for ; Tue, 3 Feb 2026 15:28:32 +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=awn75U/u2i/UnpkntbDR/+lqx1mTeV62Ui48U/DmC63KExZ2ZxcWOL1mbBfqPi3N+JtU1utxjnKkWFPPLuQWFoGe94pdPAW0HC1s3sjZM7hyYK8sX8LfTWy3gQdvKRL4tSQMyjc6RX0PTQ7XmCR4StBEH7H3RpWo9innCzcDE0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770132514; c=relaxed/simple; bh=feGXy78gm+sEIjpsQUguh5JqEfrMuxOqqTwjgBzwnqQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UbPqC8SXAYYET1OxpBjJM6mJFtz9Vw7nZ7uOggAk7z/WdIGgUxBid6SnT/F6eq5460YXpldthS/bnpDu9DvI/IVQ+f9OlB86Y7H1R5Q5UZjaCRXQmnyFmS44FECbRdyo78k/MvgVgoD1T7jX45RcQ7QR7RxwBvIERD8iJZusjsU= 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=Y9WCsSY8; 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="Y9WCsSY8" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4801ea9bafdso26104435e9.3 for ; Tue, 03 Feb 2026 07:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1770132510; x=1770737310; 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=aNBZWsXLQ30/V+1KNzhQFPY8Mm+yHT82xL2yQosJWYI=; b=Y9WCsSY89ZLbvwNK1OI+VjEIqCF5uuWdMFnbmRjSCKhSxr6o+sxVdCHjl8KoHXOrBe FgnJLDOHy+0Tia3GCq9xxrO9HP8u3UMymxeM/kYrQb76Vwfk0HWKUdfNNoiXuMIrN85s R3/GVrEjMHOpl2bvh3VozBxnNao4RwgFHkS6g1ixgAkuoJo9vTewx9Q74o3bt0Tibhd7 BXoICDeg4B/xTnWSf05koyt8PFDoY4erVty4zwmZjrWshE234S/wcRh3rM1ll3H8AOqs sYWDS2tBAkwoafI2k+9P9X1Uyg2Ge7QGAoPShyWHMapuZsvCTm9e1Aqico2ThrdiN/EG 7uLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770132510; x=1770737310; 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=aNBZWsXLQ30/V+1KNzhQFPY8Mm+yHT82xL2yQosJWYI=; b=gWRIWUlYlK1Ve/UxYFoJ9Gb1ZYwtNEjWTK9MlgU8z5nYinPRKjUSuTfAY46eNyaC5P YIvEFZ1WZ11IdNQbdzZrBEJP0VGT2NVemu+rI8KOhlYGMKloaYIaXuq7+D5B9T5+NPKf Y+euY6PJpVDYrHsVBNvwybSnodJOY868Yc/3kam5CTn3XRR+dwSa11ky9hAQ0Oo1HKKj ei4rdYi+Zc8U7EPH3XmJ6QRvu45CFccPJ1E/DpogoiOpK+41GfKUPH9DL4n8uDU8dDrA K2RzbdRlV9FGm/kTT95B1p5iV9X9rhvqFwPpT+qko6VHnNWfV71nWPDJv+SgxnDKNYCi lYBg== X-Gm-Message-State: AOJu0Ywkw1MWgR6tgXS6cDKO5Kf+veVMsFTnJaJqnHPdzkd6DpSEm8sk f73Q5ll5N04dL7PEvEPOjJyUMiWtRQ/GG6YV0J1atKnAt2eds/AZK74KxXHjZ8QyEdDe9aVSfH/ ZR11J X-Gm-Gg: AZuq6aL2WnnxHGVw4JAjRREFHaykdnodXilDGLcZVVwfaNlFQhZmFlZbhLQUlbWXDDc /y0JY5hudx2JV+Ex7lG8n1jrCbpQHTeKJcDSRFbzcFaoQAC10CH08z02MNZvNYhvChz3ZH3cNpl p43l6rS2gfdUKP9xKnhLnCK4XmdeGOmx/1VIp5DtQJhTmCWxTzHmmSgE0rwu0wzzbvRkvOzEi6J HpF+Rx7Np+hpozyvO9iw2a1AmjguwYIGEhfd2U/MJGKg9sR2ajEVHaXFsk625KWUbyAuv0N6ThV a67zAmzZNBBqgoUx6U7+tTeZI/bGfK6vjQ/971UweHeJdJe9NhIrlztVZ5iEjSN2fB2mkuePEB8 wQxKWiNPB1tNy/q3d/RkjnNzoCMu05UsEddPD6KHqr9ZuD23+6lAZJBC2Mq1Z05U5nD5O7hotaA 2IWqogiSZH4i/iTaShPCBrZJICBg== X-Received: by 2002:a05:600c:154c:b0:480:4c20:6a06 with SMTP id 5b1f17b1804b1-4830e96adbfmr164095e9.17.1770132510478; Tue, 03 Feb 2026 07:28:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Feb 2026 07:28:30 -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 0/2] Add new workqueue wrapper and enqueue on cpu functions Date: Tue, 3 Feb 2026 16:28:15 +0100 Message-ID: <20260203152818.317806-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 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_dfl() 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