On Tue, Feb 11, 2025 at 8:49 AM Peter Smith <smithpb2...@gmail.com> wrote:
>
>
> InvalidatePossiblyObsoleteSlot:
>
> 2.
> + if (possible_causes & RS_INVAL_IDLE_TIMEOUT)
> + {
> + /*
> + * Assign the current time here to avoid system call overhead
> + * while holding the spinlock in subsequent code.
> + */
> + now = GetCurrentTimestamp();
> + }
> +
>
> I felt that any minuscule benefit gained from having this conditional
> 'now' assignment is outweighed by the subsequent confusion/doubt
> caused by passing around a 'now' to other functions where it may or
> may not still be zero depending on different processing. IMO we should
> just remove all doubts and always assign it so that "now always means
> now".
>

I think we shouldn't pass now to another function, but rather do all
required computations in the caller (probably in a separate inline
function). And keep the above code as is.

-- 
With Regards,
Amit Kapila.


Reply via email to