From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10B06266577; Mon, 24 Feb 2025 18:58:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740423497; cv=none; b=tCdSSGx+stEEU7HbPhAw5Bua3m9pYEafhtsC+/rQn+BufVNX7lmdhnjDfPyYtE1AxqDGfIE9Rg40FButZDo+E6nRLClvwKjeuJAUX7dJa4FVVygLzzQILFAFTsVw5U+dMdPBUIN0+WlCHBcnNk+sx9axW17IirFkUJ/ohL+Po4k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740423497; c=relaxed/simple; bh=SvvwVkYase4DV+3hYhhZ9TkvoWn7Er4BeG+Lr15HTQY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=cqkciCW+EJfhHnbUlAcZELtfPtVyeBtwRwhD1GcS7hx+z/vOFrLrUYF9lutquGCZ7epHtSfMqWjlCttbUKMICkZ1lH0HQhuY1cle0Sd9QLfyIMn8FDYBrl9jZzREi/MWe+huUQAtINc7POgDLwil5C8Obn2fkYuj2MITlCBc7W0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VjbLZNQh; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VjbLZNQh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9E53C4CEDD; Mon, 24 Feb 2025 18:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740423496; bh=SvvwVkYase4DV+3hYhhZ9TkvoWn7Er4BeG+Lr15HTQY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=VjbLZNQhXJQwpuTOtVf40rOG+/wnfaQF+2sxU9sRbr8PsuK2wds5PoVYCZubyp6Jl leyJUlp+gDpgM74SJhtRro8T5JRB5GRMG2vXo8siZwIkCgsvnKKuu2IPqzdHj8Kx8I sNI9p4F+f7kPzY/tMSL9wP6ISaMGTx6xmt4QfyXs8NiNGfaTXMwS3p/g0cp8D7GpYZ yzYGkWZk8QmSxONArutUrHlOxss9bzceqnnHeFw6hvcD4xAEInDbYLFuk9LJX8PXzr BVxWrl+mxY9IB5yQZLSBf9g8fEYO1bsSO3YaLKLtdlyHe6GJl4xnIgsl4O/uP7wAnR dhFe+sr+DSRTw== From: Andreas Hindborg To: "Boqun Feng" Cc: "Miguel Ojeda" , "Frederic Weisbecker" , "Anna-Maria Behnsen" , "Thomas Gleixner" , "Danilo Krummrich" , "Alex Gaynor" , "Gary Guo" , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , "Benno Lossin" , "Alice Ryhl" , "Trevor Gross" , "Lyude Paul" , "Guangbo Cui" <2407018371@qq.com>, "Dirk Behme" , "Daniel Almeida" , "Tamir Duberstein" , , , "Miguel Ojeda" Subject: Re: [PATCH v9 01/13] rust: hrtimer: introduce hrtimer support In-Reply-To: (Boqun Feng's message of "Mon, 24 Feb 2025 09:01:44 -0800") References: <20250224-hrtimer-v3-v6-12-rc2-v9-0-5bd3bf0ce6cc@kernel.org> <20250224-hrtimer-v3-v6-12-rc2-v9-1-5bd3bf0ce6cc@kernel.org> <874j0j1nv2.fsf@kernel.org> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Mon, 24 Feb 2025 19:58:04 +0100 Message-ID: <87msebyxtv.fsf@kernel.org> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Boqun Feng" writes: > On Mon, Feb 24, 2025 at 05:45:03PM +0100, Miguel Ojeda wrote: >> On Mon, Feb 24, 2025 at 5:31=E2=80=AFPM Boqun Feng wrote: >> > >> > On Mon, Feb 24, 2025 at 05:23:59PM +0100, Miguel Ojeda wrote: >> > > >> > > side -- Andreas and I discussed it the other day. The description of >> > > the issue has some lines, but perhaps the commit message could >> > >> > Do you have a link to the issue? >> >> Sorry, I meant "description of the symbol", i.e. the description field >> in the patch. >> > > Oh, I see. Yes, the patch description should provide more information > about what the kconfig means for hrtimer maintainers' development. Right, I neglected to update the commit message. I will do that if we have another version. > >> > I asked because hrtimer API is always available regardless of the >> > configuration, and it's such a core API, so it should always be there >> > (Rust or C). >> >> It may not make sense for something that is always built on the C >> side, yeah. I think the intention here may be that one can easily >> disable it while "developing" a change on the C side. I am not sure >> what "developing" means here, though, and we need to be careful -- >> after all, Kconfig options are visible to users and they do not care >> about that. >> > > Personally, I don't think CONFIG_RUST_HRTIMER is necessarily because as > you mentioned below, people can disable Rust entirely during > "developing". > > And if I understand the intention correctly, the CONFIG_RUST_HRTIMER > config provides hrtimer maintainers a way that they could disable Rust > hrtimer abstraction (while enabling other Rust component) when they're > developing a change on the C side, right? If so, it's hrtimer > maintainers' call, and this patch should provide more information on > this. > > Back to my personal opinion, I don't think this is necessary ;-) > Particularly because I can fix if something breaks Rust side, and I'm > confident and happy to do so for hrtimer ;-) As Miguel said, the idea for this came up in the past week in one of the mega threads discussing rust in general. We had a lot of "what happens if I change something in my subsystem and that breaks rust" kind of discussions. For subsystems where the people maintaining the C subsystem is not the same people maintaining the Rust abstractions, this switch might be valuable. It would allow making breaking changes to the C code of a subsystem without refactoring the Rust code in the same sitting. Rather than having to disable rust entirely - or going and commenting out lines in the kernel crate - I think it is better to provide an option to just disable building these particular bindings. This has nothing to do with general policies related to breakage between Rust and C code, and how to fix such breakage in a timely manner. It is simply a useful switch for disabling part of the build so that people can move on with their business, while someone else scrambles to fix whatever needs fixing on the Rust side. I am of course also available to fix anything that would eventually break. In fact, I expect to be able to catch breakage most of the time automatically and very early by means of automatically monitoring the relevant trees. I do this for block, and it has worked really well since rust code was merged in that subsystem. Best regards, Andreas Hindborg