-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 branch information
1 parent
8af224d
commit 19c26a7
Showing
1 changed file
with
120 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters