Skip to contentSkip to conversation

Rust timekeeping for v7.4-rc1

GIT PULL Applied Andreas Hindborg 3 participants 6 messages Oct 7 – Oct 20 Rust

lore
Share & tools
lore

Andreas Hindborg

author reviewer
#0 lore raw

Hi Miguel,

Please pull these changes for rust timekeeping for v7.4-rc1.

The following changes since commit df2908090cda368b01ff43709f51890076c56157:

Linux 7.3-rc2 (2026-09-06 15:07:20 -0700)

are available in the Git repository at:

https://github.com/rust-for-linux/linux.git tags/rust-timekeeping-for-v7.4-rc1

for you to fetch changes up to 2ea0119f72dba597aa8a98cbdb72c564bfc5cb38:

rust: hrtimer: document handle based design rationale (2026-09-29 09:22:30 +0200)

----------------------------------------------------------------
Rust timekeeping changes for v7.4-rc1

This time we have a few assorted changes:

- Warnings when passing out-of-range inputs to fsleep and udelay.
- Rename ClockSource to ClockId to better align with naming conventions in C kernel.
- Make CONFIG_HZ value available as bindings::HZ.
- Add a conversion method to convert Delta to jiffies for use in timeout arguments.
- Add implementation detail documentation for HrTimer.

----------------------------------------------------------------
Andreas Hindborg (1):
rust: hrtimer: document handle based design rationale

FUJITA Tomonori (3):
rust: time: rename ClockSource trait to ClockId
rust: bindings: set HZ to CONFIG_HZ
rust: time: add Delta::to_jiffies_timeout() for timeout conversion

Sang-Heon Jeon (1):
rust: time: warn and assert out-of-range input in fsleep() and udelay()

 rust/bindings/lib.rs        |   5 ++
 rust/helpers/helpers.c      |   1 +
 rust/helpers/math.c         |   8 +++
 rust/kernel/Kconfig.test    |  10 ++++
 rust/kernel/time.rs         | 139 ++++++++++++++++++++++++++++++++++++++------
 rust/kernel/time/delay.rs   |  17 ++++--
 rust/kernel/time/hrtimer.rs |  95 +++++++++++++++++-------------
 7 files changed, 211 insertions(+), 64 deletions(-)
 create mode 100644 rust/helpers/math.c
#1 lore raw

Hi Andreas,

Quoted 31 lines · On Wed, 07 Oct 2026 15:34:44 +0200 Andreas Hindborg <[email protected]>…

Hi Miguel,

Please pull these changes for rust timekeeping for v7.4-rc1.

The following changes since commit df2908090cda368b01ff43709f51890076c56157:

Linux 7.3-rc2 (2026-09-06 15:07:20 -0700)

are available in the Git repository at:

https://github.com/rust-for-linux/linux.git tags/rust-timekeeping-for-v7.4-rc1

for you to fetch changes up to 2ea0119f72dba597aa8a98cbdb72c564bfc5cb38:

rust: hrtimer: document handle based design rationale (2026-09-29 09:22:30 +0200)

----------------------------------------------------------------
Rust timekeeping changes for v7.4-rc1

This time we have a few assorted changes:

- Warnings when passing out-of-range inputs to fsleep and udelay.
- Rename ClockSource to ClockId to better align with naming conventions in C kernel.
- Make CONFIG_HZ value available as bindings::HZ.
- Add a conversion method to convert Delta to jiffies for use in timeout arguments.
- Add implementation detail documentation for HrTimer.

----------------------------------------------------------------
Andreas Hindborg (1):
rust: hrtimer: document handle based design rationale

Quoted 7 lines

FUJITA Tomonori (3):
rust: time: rename ClockSource trait to ClockId
rust: bindings: set HZ to CONFIG_HZ
rust: time: add Delta::to_jiffies_timeout() for timeout conversion

Sang-Heon Jeon (1):
rust: time: warn and assert out-of-range input in fsleep() and udelay()

Would it be possible to also include the following two patches in this pull request?

rust: time: make Delta::ZERO generic over the time unit
rust: time: add Delta::as_jiffies_unsigned()

https://lore.kernel.org/rust-for-linux/[email protected]/
https://lore.kernel.org/rust-for-linux/[email protected]/

Three patches depend on them: the workqueue and condvar patches in the same series, and the serdev patch. All three change code that is merged through trees other than rust-next. If the two patches are in v7.4-rc1, the three patches can go through those trees in the next cycle without a dependency on the timekeeping tree.

Both patches are small and straightforward, and Gary has already given his Reviewed-by.

If it is easier, Miguel could also apply them to rust-next directly with your Acked-by. That would work for me too.

author reviewer
#2 lore raw
Quoted 59 lines · FUJITA Tomonori

Hi Andreas,

Quoted 31 lines · On Wed, 07 Oct 2026 15:34:44 +0200 Andreas Hindborg <[email protected]>…

Hi Miguel,

Please pull these changes for rust timekeeping for v7.4-rc1.

The following changes since commit df2908090cda368b01ff43709f51890076c56157:

Linux 7.3-rc2 (2026-09-06 15:07:20 -0700)

are available in the Git repository at:

https://github.com/rust-for-linux/linux.git tags/rust-timekeeping-for-v7.4-rc1

for you to fetch changes up to 2ea0119f72dba597aa8a98cbdb72c564bfc5cb38:

rust: hrtimer: document handle based design rationale (2026-09-29 09:22:30 +0200)

----------------------------------------------------------------
Rust timekeeping changes for v7.4-rc1

This time we have a few assorted changes:

- Warnings when passing out-of-range inputs to fsleep and udelay.
- Rename ClockSource to ClockId to better align with naming conventions in C kernel.
- Make CONFIG_HZ value available as bindings::HZ.
- Add a conversion method to convert Delta to jiffies for use in timeout arguments.
- Add implementation detail documentation for HrTimer.

----------------------------------------------------------------
Andreas Hindborg (1):
rust: hrtimer: document handle based design rationale

Quoted 7 lines

FUJITA Tomonori (3):
rust: time: rename ClockSource trait to ClockId
rust: bindings: set HZ to CONFIG_HZ
rust: time: add Delta::to_jiffies_timeout() for timeout conversion

Sang-Heon Jeon (1):
rust: time: warn and assert out-of-range input in fsleep() and udelay()

Would it be possible to also include the following two patches in this pull request?

rust: time: make Delta::ZERO generic over the time unit
rust: time: add Delta::as_jiffies_unsigned()

https://lore.kernel.org/rust-for-linux/[email protected]/
https://lore.kernel.org/rust-for-linux/[email protected]/

Three patches depend on them: the workqueue and condvar patches in the same series, and the serdev patch. All three change code that is merged through trees other than rust-next. If the two patches are in v7.4-rc1, the three patches can go through those trees in the next cycle without a dependency on the timekeeping tree.

Quoted 5 lines

Both patches are small and straightforward, and Gary has already given his Reviewed-by.

If it is easier, Miguel could also apply them to rust-next directly with your Acked-by. That would work for me too.

I'm not taking any more changes for timekeeping this cycle. Up to Miguel if he wants to take them directly. Otherwise wait for next cycle. Either is fine with me.

Best regards,
Andreas Hindborg

#3 lore raw
Quoted 6 lines · On Thu, 08 Oct 2026 15:02:51 +0200 Andreas Hindborg <[email protected]>…
Quoted 4 lines · FUJITA Tomonori

Hi Andreas,

On Wed, 07 Oct 2026 15:34:44 +0200
Andreas Hindborg <[email protected]> wrote:

[...]

Quoted 30 lines
Quoted 30 lines
Quoted 11 lines

----------------------------------------------------------------
Andreas Hindborg (1):
rust: hrtimer: document handle based design rationale

FUJITA Tomonori (3):
rust: time: rename ClockSource trait to ClockId
rust: bindings: set HZ to CONFIG_HZ
rust: time: add Delta::to_jiffies_timeout() for timeout conversion

Sang-Heon Jeon (1):
rust: time: warn and assert out-of-range input in fsleep() and udelay()

Would it be possible to also include the following two patches in this pull request?

rust: time: make Delta::ZERO generic over the time unit
rust: time: add Delta::as_jiffies_unsigned()

https://lore.kernel.org/rust-for-linux/[email protected]/
https://lore.kernel.org/rust-for-linux/[email protected]/

Three patches depend on them: the workqueue and condvar patches in the same series, and the serdev patch. All three change code that is merged through trees other than rust-next. If the two patches are in v7.4-rc1, the three patches can go through those trees in the next cycle without a dependency on the timekeeping tree.

Both patches are small and straightforward, and Gary has already given his Reviewed-by.

Quoted 6 lines
Quoted 2 lines

If it is easier, Miguel could also apply them to rust-next directly with your Acked-by. That would work for me too.

I'm not taking any more changes for timekeeping this cycle. Up to Miguel if he wants to take them directly. Otherwise wait for next cycle. Either is fine with me.

Thanks, Andreas.

Miguel, could you take the two patches into rust-next directly?

Applied
#4 lore raw
In reply to Andreas Hindborg
Quoted 9 lines · Andreas Hindborg

Hi Miguel,

Please pull these changes for rust timekeeping for v7.4-rc1.

The following changes since commit df2908090cda368b01ff43709f51890076c56157:

Linux 7.3-rc2 (2026-09-06 15:07:20 -0700)

Quoted 7 lines

are available in the Git repository at:

https://github.com/rust-for-linux/linux.git tags/rust-timekeeping-for-v7.4-rc1

for you to fetch changes up to 2ea0119f72dba597aa8a98cbdb72c564bfc5cb38:

rust: hrtimer: document handle based design rationale (2026-09-29 09:22:30 +0200)

Merged into rust-next -- thanks!

A couple notes:

- I had to fetch your updated GPG key. In case it helps: Linus and
other maintainers may expect to be told about the change when it happens (and, in general, rotating them too often may not be appreciated).

- Please try to have a main verb per bullet point in the merge
commit since that is the style that Linus prefers. Similarly, please use ' instead of ` (only for these messages) and wrap the message like a commit one. I tweaked the message a bit to match.

By the way, I wonder if we want to add # to the "Implementation details" sections even if it is a // (like we do for the actual /// ones).

Cheers,
Miguel

author reviewer
#5 lore raw
Quoted 18 lines · Miguel Ojeda
Quoted 9 lines · Andreas Hindborg

Hi Miguel,

Please pull these changes for rust timekeeping for v7.4-rc1.

The following changes since commit df2908090cda368b01ff43709f51890076c56157:

Linux 7.3-rc2 (2026-09-06 15:07:20 -0700)

Quoted 7 lines

are available in the Git repository at:

https://github.com/rust-for-linux/linux.git tags/rust-timekeeping-for-v7.4-rc1

for you to fetch changes up to 2ea0119f72dba597aa8a98cbdb72c564bfc5cb38:

rust: hrtimer: document handle based design rationale (2026-09-29 09:22:30 +0200)

Quoted 8 lines

Merged into rust-next -- thanks!

A couple notes:

- I had to fetch your updated GPG key. In case it helps: Linus and
other maintainers may expect to be told about the change when it happens (and, in general, rotating them too often may not be appreciated).

I think I have a two year rotation cycle set up. I rotated a while back and did not do any PRs yet, so it slipped my mind. I'll try to remember in two years.

Quoted 5 lines

- Please try to have a main verb per bullet point in the merge
commit since that is the style that Linus prefers. Similarly, please use ' instead of ` (only for these messages) and wrap the message like a commit one. I tweaked the message a bit to match.

Ok, will do.

Quoted 3 lines

By the way, I wonder if we want to add # to the "Implementation details" sections even if it is a // (like we do for the actual /// ones).

I guess we could do that for readability.

Best regards,
Andreas Hindborg