[GIT PULL] [PATCH v2 0/5] rust: Task & schedule related changes for v6.17

Boqun Feng posted 5 patches 3 months, 2 weeks ago
init/Kconfig                |  3 +++
rust/helpers/task.c         |  6 +++++
rust/kernel/lib.rs          | 48 +++++++++++++++++++++++++++++++++++++
rust/kernel/sync/condvar.rs |  3 +++
rust/kernel/sync/poll.rs    |  1 +
rust/kernel/task.rs         | 33 +++++++++++++++++++++++++
6 files changed, 94 insertions(+)
[GIT PULL] [PATCH v2 0/5] rust: Task & schedule related changes for v6.17
Posted by Boqun Feng 3 months, 2 weeks ago
Hi Ingo & Peter,

This is the updated version from my pull request last cycle:

v1: https://lore.kernel.org/rust-for-linux/20250506045843.51258-1-boqun.feng@gmail.com/

Please take a look, thanks!

Changes since v1:

- `Location::file_with_nul()` is used to avoid the C changes of
  __might_sleep()

Regards,
Boqun


The following changes since commit 5bc34be478d09c4d16009e665e020ad0fcd0deea:

  sched/core: Reorganize cgroup bandwidth control interface file writes (2025-06-18 13:59:57 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git tags/rust-sched.2025.06.24

for you to fetch changes up to 7e611710acf966df1e14bcf4e067385e38e549a1:

  rust: task: Add Rust version of might_sleep() (2025-06-24 15:53:50 -0700)

----------------------------------------------------------------
Rust task & schedule changes for v6.17:

- Make Task, CondVar and PollCondVar methods inline to avoid unnecessary
  function calls

- Add might_sleep() support for Rust code: Rust's "#[track_caller]"
  mechanism is used so that Rust's might_sleep() doesn't need to be
  defined as a macro

----------------------------------------------------------------
Boqun Feng (1):
  rust: Introduce file_from_location()

FUJITA Tomonori (1):
  rust: task: Add Rust version of might_sleep()

Kunwu Chan (2):
  rust: sync: Mark CondVar::notify_*() inline
  rust: sync: Mark PollCondVar::drop() inline

Panagiotis Foliadis (1):
  rust: task: Mark Task methods inline

 init/Kconfig                |  3 +++
 rust/helpers/task.c         |  6 +++++
 rust/kernel/lib.rs          | 48 +++++++++++++++++++++++++++++++++++++
 rust/kernel/sync/condvar.rs |  3 +++
 rust/kernel/sync/poll.rs    |  1 +
 rust/kernel/task.rs         | 33 +++++++++++++++++++++++++
 6 files changed, 94 insertions(+)

-- 
2.39.5 (Apple Git-154)
Re: [GIT PULL] [PATCH v2 0/5] rust: Task & schedule related changes for v6.17
Posted by Boqun Feng 3 months, 1 week ago
On Tue, Jun 24, 2025 at 10:15:13PM -0700, Boqun Feng wrote:
> Hi Ingo & Peter,
> 
> This is the updated version from my pull request last cycle:
> 
> v1: https://lore.kernel.org/rust-for-linux/20250506045843.51258-1-boqun.feng@gmail.com/
> 
> Please take a look, thanks!
> 

Ping ;-) I forgot to add that this is a dependency for Rust version's
read_poll_timeout(), which is a dependency to a few things:

* In the `Tyr` driver:

  https://lore.kernel.org/rust-for-linux/20250628.224928.690831629261546521.fujita.tomonori@gmail.com/

* In Nova, the gpu driver:

  https://lore.kernel.org/rust-for-linux/20250619-nova-frts-v6-24-ecf41ef99252@nvidia.com/

* In the qt2025 phy driver:

  https://lore.kernel.org/lkml/20250220070611.214262-9-fujita.tomonori@gmail.com/

Thanks!

Regards,
Boqun

> Changes since v1:
> 
> - `Location::file_with_nul()` is used to avoid the C changes of
>   __might_sleep()
> 
> Regards,
> Boqun
> 
> 
> The following changes since commit 5bc34be478d09c4d16009e665e020ad0fcd0deea:
> 
>   sched/core: Reorganize cgroup bandwidth control interface file writes (2025-06-18 13:59:57 +0200)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git tags/rust-sched.2025.06.24
> 
> for you to fetch changes up to 7e611710acf966df1e14bcf4e067385e38e549a1:
> 
>   rust: task: Add Rust version of might_sleep() (2025-06-24 15:53:50 -0700)
> 
> ----------------------------------------------------------------
> Rust task & schedule changes for v6.17:
> 
> - Make Task, CondVar and PollCondVar methods inline to avoid unnecessary
>   function calls
> 
> - Add might_sleep() support for Rust code: Rust's "#[track_caller]"
>   mechanism is used so that Rust's might_sleep() doesn't need to be
>   defined as a macro
> 
> ----------------------------------------------------------------
> Boqun Feng (1):
>   rust: Introduce file_from_location()
> 
> FUJITA Tomonori (1):
>   rust: task: Add Rust version of might_sleep()
> 
> Kunwu Chan (2):
>   rust: sync: Mark CondVar::notify_*() inline
>   rust: sync: Mark PollCondVar::drop() inline
> 
> Panagiotis Foliadis (1):
>   rust: task: Mark Task methods inline
> 
>  init/Kconfig                |  3 +++
>  rust/helpers/task.c         |  6 +++++
>  rust/kernel/lib.rs          | 48 +++++++++++++++++++++++++++++++++++++
>  rust/kernel/sync/condvar.rs |  3 +++
>  rust/kernel/sync/poll.rs    |  1 +
>  rust/kernel/task.rs         | 33 +++++++++++++++++++++++++
>  6 files changed, 94 insertions(+)
> 
> -- 
> 2.39.5 (Apple Git-154)
>
Re: [GIT PULL] [PATCH v2 0/5] rust: Task & schedule related changes for v6.17
Posted by Alice Ryhl 2 months, 2 weeks ago
On Mon, Jun 30, 2025 at 3:50 PM Boqun Feng <boqun.feng@gmail.com> wrote:
>
> On Tue, Jun 24, 2025 at 10:15:13PM -0700, Boqun Feng wrote:
> > Hi Ingo & Peter,
> >
> > This is the updated version from my pull request last cycle:
> >
> > v1: https://lore.kernel.org/rust-for-linux/20250506045843.51258-1-boqun.feng@gmail.com/
> >
> > Please take a look, thanks!
> >
>
> Ping ;-) I forgot to add that this is a dependency for Rust version's
> read_poll_timeout(), which is a dependency to a few things:
>
> * In the `Tyr` driver:
>
>   https://lore.kernel.org/rust-for-linux/20250628.224928.690831629261546521.fujita.tomonori@gmail.com/
>
> * In Nova, the gpu driver:
>
>   https://lore.kernel.org/rust-for-linux/20250619-nova-frts-v6-24-ecf41ef99252@nvidia.com/
>
> * In the qt2025 phy driver:
>
>   https://lore.kernel.org/lkml/20250220070611.214262-9-fujita.tomonori@gmail.com/
>
> Thanks!

I would love to see this land to unblock the above users. I wanted to
add that I fixed the Rust language so that it NUL-terminates these
filename strings, so Ingo's concern from the last cycle should not
apply to this version of the PR.

Thanks!
Alice
Re: [GIT PULL] [PATCH v2 0/5] rust: Task & schedule related changes for v6.17
Posted by Boqun Feng 2 months, 2 weeks ago
On Mon, Jul 21, 2025 at 01:00:49PM +0200, Alice Ryhl wrote:
> On Mon, Jun 30, 2025 at 3:50 PM Boqun Feng <boqun.feng@gmail.com> wrote:
> >
> > On Tue, Jun 24, 2025 at 10:15:13PM -0700, Boqun Feng wrote:
> > > Hi Ingo & Peter,
> > >
> > > This is the updated version from my pull request last cycle:
> > >
> > > v1: https://lore.kernel.org/rust-for-linux/20250506045843.51258-1-boqun.feng@gmail.com/
> > >
> > > Please take a look, thanks!
> > >
> >
> > Ping ;-) I forgot to add that this is a dependency for Rust version's
> > read_poll_timeout(), which is a dependency to a few things:
> >
> > * In the `Tyr` driver:
> >
> >   https://lore.kernel.org/rust-for-linux/20250628.224928.690831629261546521.fujita.tomonori@gmail.com/
> >
> > * In Nova, the gpu driver:
> >
> >   https://lore.kernel.org/rust-for-linux/20250619-nova-frts-v6-24-ecf41ef99252@nvidia.com/
> >
> > * In the qt2025 phy driver:
> >
> >   https://lore.kernel.org/lkml/20250220070611.214262-9-fujita.tomonori@gmail.com/
> >
> > Thanks!
> 
> I would love to see this land to unblock the above users. I wanted to

Thanks, Alice. It's already merged in tip tree:

	https://lore.kernel.org/lkml/175153176741.406.14557081807475800171.tip-bot2@tip-bot2/
	https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=7e611710acf966df1e14bcf4e067385e38e549a1

> add that I fixed the Rust language so that it NUL-terminates these
> filename strings, so Ingo's concern from the last cycle should not
> apply to this version of the PR.
> 

Thanks a lot for pushing the changes at the Rust language side.

Regards,
Boqun

> Thanks!
> Alice
> 
Re: [GIT PULL] [PATCH v2 0/5] rust: Task & schedule related changes for v6.17
Posted by Alice Ryhl 2 months, 2 weeks ago
On Mon, Jul 21, 2025 at 3:50 PM Boqun Feng <boqun.feng@gmail.com> wrote:
>
> On Mon, Jul 21, 2025 at 01:00:49PM +0200, Alice Ryhl wrote:
> > On Mon, Jun 30, 2025 at 3:50 PM Boqun Feng <boqun.feng@gmail.com> wrote:
> > >
> > > On Tue, Jun 24, 2025 at 10:15:13PM -0700, Boqun Feng wrote:
> > > > Hi Ingo & Peter,
> > > >
> > > > This is the updated version from my pull request last cycle:
> > > >
> > > > v1: https://lore.kernel.org/rust-for-linux/20250506045843.51258-1-boqun.feng@gmail.com/
> > > >
> > > > Please take a look, thanks!
> > > >
> > >
> > > Ping ;-) I forgot to add that this is a dependency for Rust version's
> > > read_poll_timeout(), which is a dependency to a few things:
> > >
> > > * In the `Tyr` driver:
> > >
> > >   https://lore.kernel.org/rust-for-linux/20250628.224928.690831629261546521.fujita.tomonori@gmail.com/
> > >
> > > * In Nova, the gpu driver:
> > >
> > >   https://lore.kernel.org/rust-for-linux/20250619-nova-frts-v6-24-ecf41ef99252@nvidia.com/
> > >
> > > * In the qt2025 phy driver:
> > >
> > >   https://lore.kernel.org/lkml/20250220070611.214262-9-fujita.tomonori@gmail.com/
> > >
> > > Thanks!
> >
> > I would love to see this land to unblock the above users. I wanted to
>
> Thanks, Alice. It's already merged in tip tree:
>
>         https://lore.kernel.org/lkml/175153176741.406.14557081807475800171.tip-bot2@tip-bot2/
>         https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=7e611710acf966df1e14bcf4e067385e38e549a1

Thanks for clarifying.

Alice