From 8aa9c4d0044f02b333291bfa6b8cf65ee5aed77d Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 13 Nov 2024 22:53:35 -0800 Subject: [PATCH] Don't use AtomicFreeList to squash TSAN complains The previous fix attempt didn't work on some test. There are no known bugs with AtomicFreeList other than tripping TSAN, and it's unclear that TSAN isn't at fault. However, switching to using a mutex works fine and doesn't appear to be slower (it's actually faster with synthetic benchmarks on macOS) BUGS=[377369108] --- libs/utils/include/utils/JobSystem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/utils/include/utils/JobSystem.h b/libs/utils/include/utils/JobSystem.h index 7ea711661a49..704755aa491a 100644 --- a/libs/utils/include/utils/JobSystem.h +++ b/libs/utils/include/utils/JobSystem.h @@ -446,7 +446,7 @@ class JobSystem { Condition mWaiterCondition; std::atomic mActiveJobs = { 0 }; - utils::Arena, LockingPolicy::NoLock> mJobPool; + utils::Arena, LockingPolicy::Mutex> mJobPool; template using aligned_vector = std::vector>;