Re: [PATCH v1 2/2] rust: time: add Delta::to_jiffies_timeout() for timeout conversion
"Gary Guo" <[email protected]>
| Newsgroups | org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
On Wed Aug 12, 2026 at 7:06 AM BST, Miguel Ojeda wrote: > On Wed, Aug 12, 2026 at 2:05 AM FUJITA Tomonori <[email protected]> wrote: >> >> Miguel, you suggested landing the minimum set, e.g. the first 2 or >> first 4 patches. Patches 1-3 are already in, so that leaves patch >> 4. Would you like to take this version, which clamps the result and >> has a KUnit test that fails on arm with HZ=1000 without the clamp, >> or should I hold it for early next cycle? Either is fine with me. > > Up to timekeeping, but it is very late and I think Andreas was already > on the fence of deferring everything even before this version. > > But I appreciate that you reworked this very quickly as soon as I > found that issue -- thanks Tomo. > > I am happy to give a tag or similar if needed next cycle for Gary's > use case etc., so it is not a problem. Yeah, I don't think we should rush. I suggest taking the first few patches for the last series just so that we have the new types for jiffies to prevent more users being added relying on the integer typedefs. The APIs themselves wouldn't need to conversions (they'll just take `Delta<Jiffy>`). The conversion functions can be added at a different pace and we should definitely carefully review the boundary conditions. Best, Gary > > If we were to actually take it, then I think that, generally speaking, > any version that works in all cases is to be strongly favored even if > it can be optimized/improved later, i.e. what I think matters the most > is agreeing on the documented contract, i.e. to agree on what we want > the function to actually do. Function bodies can always be improved > later. > > Cheers, > Miguel