From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 7635029B777 for ; Tue, 3 Feb 2026 10:19:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770113999; cv=none; b=TdGNvUROPJYjU43t91o0kdGiIzVnCKoHwNxkBPkHC7s/c2u+nH+Vf5WnSMIE5VhG4edu5gDaF783iwc2FDXeULlFbGG2BhZHC/pQjTEGlX41YgBWh/Zfzh0g3kgnWhEsD5tNIG4kDry6f/LPOWGuEx24IPdqAUsancrqtmM1Dl8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770113999; c=relaxed/simple; bh=xvvkQhtVIqyzEPg+3gJRfjF7bLrgLly5dCN4UQJTB5Y=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=TChgbcGrKc4RM8tXrOEDwFLyi86AXQvIw8T+xBan68AkxEeSTDlydjPQ/W8HpprqN+FTFDhHwc64ulEQunko2Q1uYOp6JIx11wy1DgG4Rt+M6iiEF0Cf3o/Y6tJn+pwMgAUIBRouXjda7RQ043+LbTQD4qBoewGgsBeKSrDsTgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=dC56ye3Z; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dC56ye3Z" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-47ee056e5cfso49838315e9.1 for ; Tue, 03 Feb 2026 02:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770113996; x=1770718796; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=ZKtpLfF5GQtcoNGGOm242qe747ja9KaZrktNT9l6vdo=; b=dC56ye3ZIMcOWhbvc9ScGwedwYkt7DGyHNl108rLQZtzfqwk4kZlj7RAOuwMq/uWIe FC1wlNeu/O2zEaVqzQOVqHt88H5S2RIzKhH6kKxZxG5W5VjbZr0Vh8kqDOjt1hKDcQvF WA2fbN+S//yrEd1jDsw2MBGhH9nEcvl1eJHGagRSPiz5hPu6l8dIschzvx9qTo58xQp+ 9yKrjAjfYrHVA4ITBAjMbOIMmBhMDtSbYv/3Tla3sLZIfenvWttnFtpuDqHajJ/1M0Re ljJlAwaLshV/cXi6On7fMwnz2/tAMNJAnwgV1AnCIOJk1hLt01tdlBYYGhJp1J/5Xtew oqGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770113996; x=1770718796; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=ZKtpLfF5GQtcoNGGOm242qe747ja9KaZrktNT9l6vdo=; b=l1Kbh1xeES+33niojHGnH5DM5l4QUp7F/uF7XJ8+TEgfGwoZ9AbdEoq4JJmNgdoW2U Q/1T33MXGNlknaMVgCr5RV3qeAP0juTQeBk55LSKgrnKQDMPPk2eJ+mjqBZdpgxury8v HMfPEcqNutie9DOvtQsB3PpTEDTD5jP/ft+429oOuJkYzzlSEUpAnDG3jSJ2ALOC3Vs9 IwBRXsQ3EPu2cu3HyZ1kP4Ft2YR18ReI56V9g4uF1ep/XzcOqY37t0Mv8EcJoUgcerGY 0WsPd3FJrn2XZVb0ITi6FjKkUsX5d8iBeY4kbnO41MUHLurkxnvhgDRvdRuOaqIJm3OA Sztg== X-Forwarded-Encrypted: i=1; AJvYcCXRyfnUtphyddiCfOHOlgnVIh9J3hJY++V1wdrGukiySw4Km09o+6c6KqgsmPKXMWcM1EZFhbNKEosEZ7M=@vger.kernel.org X-Gm-Message-State: AOJu0YwrVr3kcYH8TkRJDDsR2isjwd32uBIazFC1W4F6/pTPM1cT2qJv yGkcLejiSFoAuGDRuMQzWv616qP2X6TbcpaeO6/AxV2gagkdRYPx/qoQTVfUf+CyjKrzMoJALU9 +WIRqoO+DX+l7tEA/AA== X-Received: from wmfv6.prod.google.com ([2002:a05:600c:15c6:b0:480:73cc:3e48]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3148:b0:47a:935f:618e with SMTP id 5b1f17b1804b1-482db45ce3amr189304255e9.15.1770113995703; Tue, 03 Feb 2026 02:19:55 -0800 (PST) Date: Tue, 3 Feb 2026 10:19:49 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251008151554.340806-1-marco.crivellari@suse.com> <20251008151554.340806-3-marco.crivellari@suse.com> Message-ID: Subject: Re: [PATCH v3 2/2] rust: add system_percpu() around the new system_percpu_wq From: Alice Ryhl To: Marco Crivellari Cc: Tejun Heo , Boqun Feng , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Michal Hocko , Miguel Ojeda , Alex Gaynor Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 03, 2026 at 09:41:07AM +0100, Marco Crivellari wrote: > On Mon, Jan 12, 2026 at 5:23=E2=80=AFPM Alice Ryhl = wrote: > > [...] > > > > Another approach is to add a new `enqueue_cpu` to the existing `Que= ue` > > > > struct. In that case, all of these four combinations become legal: > > > > > > > > workqueue::system().enqueue(my_work_item) > > > > workqueue::system().enqueue_cpu(my_work_item, cpu_id) > > > > workqueue::system_percpu().enqueue(my_work_item) > > > > workqueue::system_percpu().enqueue_cpu(my_work_item, cpu_id= ) > > > > > > > > which approach is best depends on whether you want all four combina= tions > > > > to be legal or not. >=20 > Hi Alice, >=20 > I was starting yesterday evening when I realized the 2nd approach > would be a better > fit for the work we should do now. I also think in this series we > should already convert > the system() users to system_percpu() (same goes for system_unbound() > =3D> system_dfl()). >=20 > Using the 2nd approach would just make the migration smooth because we ca= n just > rename all the users of those functions. >=20 > I think it's better to migrate / convert to the new functions because > they are using the new > introduced workqueues. Sooner or later in the C code we are going to > have warnings > for users who are stuck on the older workqueues, so it's better to > also migrate the Rust code > on the newer version. >=20 > In short: I would like to introduce only enqueue_cpu() so that it's > just easier to do a 1:1 conversion > without changing the behavior and in the meantime introduce these renames= : >=20 > system_unbound() =3D> system_dfl() > system() =3D> system_percpu() >=20 >=20 > What do you think? I'm ok with the simpler approach. Alice