[igt-dev] [PATCH i-g-t] igt/sw_sync: Wrap threaded counter manipulation with mb
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Fri Jun 15 11:00:11 UTC 2018
Quoting Chris Wilson (2018-05-02 12:28:07)
> sw_sync/sync_multi_consumer_producer was communicating between threads
> using the sw_sync ioctl and manipulating a shared volatile counter.
> However, the ioctl itself does not imply a memory barrier, and so
> different CPUs may see different states of the counter (the volatile
> making GCC perform the operation in stages making the race even more
> likely). Instead of using volatile, use locked operations to make the
> counter manipulation thread-safe.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=106344
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Sorry, this has got buried along with the probably thousand other
patches.
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Regards, Joonas
More information about the igt-dev
mailing list