Re: [PATCH v11 0/8] rust: Add IO polling

Boqun Feng
2025-03-20T19:04:59Z

On Thu, Feb 20, 2025 at 04:06:02PM +0900, FUJITA Tomonori wrote:
> Add a helper function to poll periodically until a condition is met or
> a timeout is reached. By using the function, the 8th patch fixes
> QT2025 PHY driver to sleep until the hardware becomes ready.
>
> 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.
>
> The remaining patches are for the Rust portion and updates to the
> MAINTAINERS file.
>
> This introduces two new types, Instant and Delta, which represent a
> specific point in time and a span of time, respectively.
>

I propose we should make forward-progress by merging patch #2 to #6 in
mainline first. These are relatively trivial and only affect Rust side,
and the whole patchest does show that they have potential users.

Thomas, John, Stephen, Anna-Maria and Frederic, does this sound good to
you? If so, could any of you provide Acked-by/Reviewed-by and suggest
how should we route these patches? Thanks a lot!

Regards,
Boqun

> Unlike the old rust branch, This adds a wrapper for fsleep() instead
> of msleep(). fsleep() automatically chooses the best sleep method
> based on a duration. …