Re: [PATCH v4 0/7] rust: use Delta instead of raw jiffies for timeouts and delays
Andreas Hindborg <[email protected]> Wed, 05 Aug 2026 14:48:07 +0200
| Newsgroups | org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
"FUJITA Tomonori" <[email protected]> writes: > On Thu, 30 Jul 2026 14:09:59 +0100 > "Gary Guo" <[email protected]> wrote: > >> On Wed Jul 22, 2026 at 10:49 PM BST, FUJITA Tomonori wrote: >>> From: FUJITA Tomonori <[email protected]> >>> >>> CondVar::wait_interruptible_timeout() and Queue::enqueue_delayed() use >>> a raw jiffies count (a plain c_ulong alias with no type >>> safety). Callers have to know on their own that the value meant >>> jiffies and convert to/from it themselves, which is easy to get wrong >>> (e.g. passing a millisecond value where a jiffies value is expected). >>> >>> Both APIs just take a span of time so, they can use the Delta type >>> instead. >>> >>> This series makes Delta generic over its time unit with Nsec and Jiffy >>> types, switches CondVar and Queue to use Delta instead of raw jiffies >>> (updating binder's ioctl_freeze(), the only caller of >>> wait_interruptible_timeout()), and then removes the now-unused Jiffies >>> and Msecs type aliases. >> >> There are more jiffy users being added so we should take this sooner than later: >> https://lore.kernel.org/rust-for-linux/[email protected]/#t >> >> Andreas, any plan on taking this via timekeeping-next? I suppose Boqun >> could also be taken via rust-sync tree if you give an ack? > > Agreed. Getting this into the next merge window would be great. I was on vacation, back now. Getting this in the merge window for v7.3 is probably a little tight. We should aim for v7.4. I will take closer look this week. Best regards, Andreas Hindborg