From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 F0D9B395270 for ; Tue, 3 Feb 2026 08:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.208.182 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770108082; cv=pass; b=K14sxBuwJMpA0+p8Zi2UABfsX1cAYyDJq+2AaN2H/PKC+Z1v9EhBDyBHJxtOBWPQSsBb1tiThjPUDdguC13ISEC0rqEeGAYEKpSRe/Ju2YxuAcgkKrN5bnCDyP6OKhSUnTuXJ3g8xMDaNIbHegvSel5tj5PrN5GB0GCYadFIbwI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770108082; c=relaxed/simple; bh=PMRxlbkEF4KFUzoptN2CxIOjsCTZ10JowSrQO6l1IcI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=cG5kghjjAdJzVOIzAVk1T0sTgPrVMJzs2JQ/bXk+M8TpgAYh4FuZ52Zqui4ifQ+uq55i9EcfaXcuusFlbDYYy9C1cjBmVViGmAhpaVhunlmqj2fvXc+JI4LUSIcok49LgXIPkeoo2sbAIHtG+ovN94K66WZYlJrxUIPj8WpXNBo= ARC-Authentication-Results:i=2; 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=Jm7IRc7H; arc=pass smtp.client-ip=209.85.208.182 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="Jm7IRc7H" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-38316d0c26eso46067351fa.2 for ; Tue, 03 Feb 2026 00:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770108079; cv=none; d=google.com; s=arc-20240605; b=jiVl4h8NiFDlBUoFSgW6a6fkn4MnC2ul5EqODWDlaXeYeCkvytPmcGWEbOYYAvx1An ySIS+6J2YXLTHFTzeV3IgIqEU+3D1/6iihNe8/MoBtWAZpTbRYF3hAbpuUsgsg+xb8DT L66Mz7cHHT5LUK3MtL2eF7xTmW+iMIpsXn0/Hsfb/aiG3RwHy8CQlk3Lzy9Dkn/ipeuu cIXhHd7C4pckuI6F97rKgg8HFP7eQc2jG+mrSV2++X5BjVfLjB2PHznWonvKit7s+/2e OSwh9bXM/ldQyzGPSqetNL/YRNeaHguZ3zsSDbFzuTeW7VfFhElNurMORyacicalk/Wl steA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NcDKsRau6HZ+Ra5LecblzQ+rM9+KKeh5X8nRygpe48c=; fh=qw66MEHsRlvjPqlfeanlrt10KFtTl4+sNOY4Srv9JrA=; b=Ii68YGUKPhNerojod940oG/3i+pEojdOM1OIdpciuq59Jms272RbtIkhDIkJBNr6Ya 0rFbMwh7c8WjuF9dKWc65xDQsqarx2isq8mBp5TJGTnubRkhPDnxq3+VHCgWaraf99tJ 6bD/BPOXjqD7oOzl6PJ1woSn5PZsSuDuqsAB9Fe+AeYMUx3MlIDxHvjLb5kyOHYs+dxu UwM7wxjxw/sS2oyyFT97hKLpK8nTbBiPOAxWPLSeqM/06CFBltjxYN5Nb6zXiaXDJO5m YHN/u7tqQ5hjGdljT9An4Rcx1c/7jxl+dIDnT3l58hpPDPIKJAAUyfH2zL6JHrg/TfEW rHtg==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1770108079; x=1770712879; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NcDKsRau6HZ+Ra5LecblzQ+rM9+KKeh5X8nRygpe48c=; b=Jm7IRc7HL4BkLlk98Wd099P5gg28xDcdWdqaM5WWrmLuvFjMW/OCf6tr1V2j1KYNgP KJlddT1ni9FTacLBNmRXloRjnLVIZMFlyCM8MPgTRq7leF70HOacxV3ClEKf+QaUmfQA oiCUi1v/6vwqH6pRnJeSk/YZHHLbZK7wXMMWEdlZO0I5QxmbPmm1t4h357JVRRL7Firr Oq+4P63DBnDxN7fea5B2AjfLMWlwJwxiToQC6quJZFDbmIMZA0YDPx0KdHN50TyLVfac 8afu7puEjXef7ivOyvQIv+QbyrZ+aqOjGpUzFWfHP1ZdyFulLvqxCejT2NndepJXhbcW /8wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770108079; x=1770712879; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NcDKsRau6HZ+Ra5LecblzQ+rM9+KKeh5X8nRygpe48c=; b=GKpr6wfEfFlzThPSwPx5vXJW7aV0X8cpN0hU6jt0EYYa5aeQPQ49xrMBucUt6W9+et Fe/602+tpSUUgxq3GaN/mKSY3qfcWwQjnXvKwtIr9Hb2faOtsGJ08YpYnwpAlwLi8bY/ BEg2IJjrmUDe+8WWbgs3h9N5oj5VztMtC0imAGmCJIxP3OZKB8u4grFhOUc3YmdZYJA/ 8sisj+SZ83KYbRSO3LWnoUihYzlw/Lcwb+7GnxZFcWUjko5pik2a+K8Jz1fStiqPPYmA fHAVyfyDsr3tkUgSX4XTuCfrjyND6YxNMDE2Biq03iMgHuy1RqV7xAFKMNgtO3KBC6kc fW/Q== X-Forwarded-Encrypted: i=1; AJvYcCXp+3STqoHpbY/Y4rU4wrYfsObpqV1jALcaNbKqKyePrJhjJTgqKEqvtDtNa6nUo0hFSg0C2lzGmGOkkC8=@vger.kernel.org X-Gm-Message-State: AOJu0YxPmLqbDbW3Uq5xH2SIl6GBcl6sEHwx+6EJrWBgmO2TpFPaWFCZ ucNF3ngAkI/K8TEsESFlof4i2XSg4EXxenfcCuQjE4uAtIwB2d7ruLP1eKWUbMbroSuXlydi6pM jEfJweFePYHgEJ541bVDJo5q6fgMp7Xdi1zzHgCH7dVl5EXDSoCSksNg= X-Gm-Gg: AZuq6aLza0cRhpNYws7UGt3piJRUqM4SPHeK5P0gc/zR+xv/7sSoZH/0idda3eL/Wp8 MjcAklFbsSlW6HL5GScX4X/sCMh0dpJZHz6tr8dkiUBOwLJkEXYlUVbqSeMLXrVuPLN+ckQpMdZ NNU780d0CCXzTlLA0wBpW6oRlYM5ljgEH1fM7kqP652IiwBuxWq76XphwzHQgcJx+xfjvwiht4y gFQhwJHgc2IAUBC+gdkBcdiI5f5nVdv1aRw+p2akzzPlViuX9cXdEkz5nkcjjzZW2mV6U+hzeQ7 ebpTI2AuKBAKCajo1alVrf/mQVOS+6Ze9VVzeds= X-Received: by 2002:a05:6512:4023:b0:59d:e018:563d with SMTP id 2adb3069b0e04-59e16430278mr5843792e87.37.1770108079157; Tue, 03 Feb 2026 00:41:19 -0800 (PST) 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> In-Reply-To: From: Marco Crivellari Date: Tue, 3 Feb 2026 09:41:07 +0100 X-Gm-Features: AZwV_QjUiAIa8vGSQdvGu2zSuvzaJXLseni5phl-SCrg8JLEHTZ1OtCOtIwRyNQ Message-ID: Subject: Re: [PATCH v3 2/2] rust: add system_percpu() around the new system_percpu_wq To: Alice Ryhl 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 Mon, Jan 12, 2026 at 5:23=E2=80=AFPM Alice Ryhl w= rote: > [...] > > > Another approach is to add a new `enqueue_cpu` to the existing `Queue= ` > > > 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 combinati= ons > > > to be legal or not. Hi Alice, 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()). Using the 2nd approach would just make the migration smooth because we can = just rename all the users of those functions. 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. 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: system_unbound() =3D> system_dfl() system() =3D> system_percpu() What do you think? Thanks! -- Marco Crivellari L3 Support Engineer