Re: [PATCH v4 0/7] rust: use Delta instead of raw jiffies for timeouts and delays

FUJITA Tomonori <[email protected]> Fri, 31 Jul 2026 22:48:25 +0900 (JST)
Newsgroups org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
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.

Thanks,