Rust for Linux List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: FUJITA Tomonori <fujita.tomonori@gmail.com>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	ojeda@kernel.org, alex.gaynor@gmail.com, gary@garyguo.net,
	bjorn3_gh@protonmail.com, benno.lossin@proton.me,
	a.hindborg@samsung.com, aliceryhl@google.com, tmgross@umich.edu,
	dakr@kernel.org, mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, pmladek@suse.com
Subject: Re: [PATCH v2 0/2] add Rust version of might_sleep()
Date: Tue, 22 Apr 2025 16:31:45 +0200	[thread overview]
Message-ID: <20250422143145.GC15651@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <aAen7fQYciq2azi9@Mac.home>

On Tue, Apr 22, 2025 at 07:30:05AM -0700, Boqun Feng wrote:
> On Fri, Apr 11, 2025 at 07:56:21AM +0900, FUJITA Tomonori wrote:
> > This patchset adds Rust version of might_sleep().
> > 
> > These patches were previously part of the IO polling patchset [1], but
> > they were split out to make upstreaming easier.
> > 
> > The first patch is for sched/core, which adds
> > __might_sleep_precision(), rust friendly version of __might_sleep(),
> > which takes a pointer to a string with the length instead of a
> > null-terminated string. Rust's core::panic::Location::file(), which
> > gives the file name of a caller, doesn't provide a null-terminated
> > string. __might_sleep_precision() uses a precision specifier in the
> > printk format, which specifies the length of a string; a string
> > doesn't need to be a null-terminated. Providing a null-terminated
> > string for better C interoperability is under discussion [2].
> > 
> > The second patch adds a Rust implementation of might_sleep(), on top
> > of the changes in the first patch.
> > 
> > [1]: https://lore.kernel.org/lkml/20250220070611.214262-1-fujita.tomonori@gmail.com/
> > [2]: https://github.com/rust-lang/libs-team/issues/466
> > 
> > v2:
> > - improve SAFETY comment
> > v1: https://lore.kernel.org/lkml/20250406110718.126146-1-fujita.tomonori@gmail.com/
> > 
> 
> @scheduler, if there is no objection, I'm going to take these two into a
> pull request to tip soon. Thanks!

Yeah, go ahead. I still think Rust should be fixed, but sure, we can
live with this until that time.

      reply	other threads:[~2025-04-22 14:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 22:56 [PATCH v2 0/2] add Rust version of might_sleep() FUJITA Tomonori
2025-04-10 22:56 ` [PATCH v2 1/2] sched/core: Add __might_sleep_precision() FUJITA Tomonori
2025-04-10 22:56 ` [PATCH v2 2/2] rust: task: add Rust version of might_sleep() FUJITA Tomonori
2025-04-11  9:11   ` Alice Ryhl
2025-04-22 14:30 ` [PATCH v2 0/2] " Boqun Feng
2025-04-22 14:31   ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250422143145.GC15651@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=a.hindborg@samsung.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=bsegall@google.com \
    --cc=dakr@kernel.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox