[scudo] Finer lock granularity in Region of SizeClassAllocator64
In this CL, we introduce two new locks, MMLock for MemMap operations and FLLock for freelist operations. MMLock will be used when we want to manipulate pages. For example, mapping more pages through populateFreeList() and releaseToOSMaybe(). FLLock will be used when we want to access the freelist. For example, pushBlocks() and popBatch(). With the new locks, they increase the parallelism of the operations mentioned above. For example, populateFreeList() won't block the pushBlocks() when it's still doing the system call for more pages. We also enforce lock hierarchy to avoid deadlock, MMLock is required to be held before FLLock if you have to lock both of them. We don't store the lock owner, therefore, we rely static thread-safey annotation to detect any violation. Differential Revision: https://reviews.llvm.org/D149140
Loading
Please sign in to comment