> On 22 Nov 2021, at 14:05, Michail Nikolaev <michail.nikolaev@gmail.com> wrote:
>
>> Write barrier must be issued after write, not before.
>> Don't we need to issue read barrier too?
>
> The write barrier is issued after the changes to KnownAssignedXidsNext
> and KnownAssignedXidsValid arrays and before the update of
> headKnownAssignedXids.
> So, it seems to be correct. We make sure once the CPU sees changes of
> headKnownAssignedXids - underlying arrays contain all the required
> data.
Patch on barrier seems too complicated to me right now. I’d propose to focus on KnowAssignedXidsNext patch: it’s clean,
simpleand effective.
I’ve rebased the patch so that it does not depend on previous step. Please check out it’s current state, if you are OK
withit - let’s mark the patch Ready for Committer. Just maybe slightly better commit message would make the patch
easierto understand.
Thanks! Best regards, Andrey Borodin.