On 4/21/18 9:05 AM, Bart Van Assche wrote: > On Sat, 2018-04-21 at 22:55 +0800, jianchao.wang wrote: >> So we have a __deadline as below: >> >> deadline gen state >>> ______________|____|_| >> >> \___ __/ >> V >> granularity >> >> and even we usually have a 30~60s timeout, >> but we should support a 1s granularity at least. >> How to decide the granularity ? > > Your diagram shows that the uppermost bits are used for the deadline. What I > proposed is to use the lower 32 bits for the deadline such that we again have > a resolution of 1/HZ. It honestly doesn't matter how we do it, granularity could be exactly the same. But yeah, storing it at the lower bits is perfectly fine, either way works. Only difference is in the encoding, functionally they can be identical. -- Jens Axboe