> On 11 Apr 2025, at 21:08, Rahila Syed <rahilasyed90@gmail.com> wrote:
>
> Hi Daniel,
>
> Thank you for your review and code improvements.
>
> Please find below some observations.
>
> 1. dsm_unpin_mapping(dsm_segment *seg)
> + if (CurrentResourceOwner && IsResourceOwnerReleasing(CurrentResourceOwner))
> + return;
>
> Given that the function can return without setting resowner to a
> CurrentResourceOwner which is not NULL, shall we change the function
> signature to return true when "unpin" is successful and false when not?
Maybe, but at this point in the cycle we cannot change the prototype like that.
Food for thought for v19 though.
> 2. If value of IsResourceOwnerReleasing changes between dsm_create_descriptor
> and attach_internal, the dsm segment and dsa area will end up with different resource owners.
> Earlier the chances of CurrentResourceOwner changing between the two functions were zero.
> May be something can be done to keep resowner assignments under both these functions
> in sync.
Hmm, that's a good question, not sure. Do you have a repro for this handy?
Attached is a current v4 with a few small tweaks.
--
Daniel Gustafsson