[PATCH v4 1/1] drm/syncobj: add sideband payload

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 9 12:49:33 UTC 2019


Quoting Lionel Landwerlin (2019-08-09 13:38:57)
> On 09/08/2019 14:58, Chris Wilson wrote:
> > Not atomic (the u64 write should really be to avoid total corruption)
> > and nothing prevents userspace from racing. How safe is that in the
> > overall design?
> 
> 
> Atomic would prevent issue related to 2 processes/threads seeing 
> different values because of caching?

No, the kernel atomics themselves do not guarantee memory barriers in
all cases. The issue I see here is that we can not safely do a u64
increment on all platforms without write tearing. E.g. two clients
simultaneously incrementing from U32_MAX becomes 0x1 (both would report
U32_MAX)
-Chris


More information about the dri-devel mailing list