On Tue, 7 Jan 2025 at 20:20, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote: > > On Tue, Jan 07, 2025 at 05:59:49AM -0800, Kumar Kartikeya Dwivedi wrote: > > +struct rqspinlock_timeout { > > + u64 timeout_end; > > + u64 duration; > > + u16 spin; > > +}; > > > +#define RES_CHECK_TIMEOUT(ts, ret) \ > > + ({ \ > > + if (!((ts).spin++ & 0xffff)) \ > > Per the above spin is a u16, this mask is pointless. Ack, I will drop the redundant mask. > > > + (ret) = check_timeout(&(ts)); \ > > + (ret); \ > > + })