[all-commits] [llvm/llvm-project] ab17ec: [scudo] Add ConditionVariable in SizeClassAllocato...
ChiaHungDuan via All-commits
all-commits at lists.llvm.org
Thu Oct 19 15:47:31 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ab17ecd107670cd843a9074e4d0bc33810abcf5e
https://github.com/llvm/llvm-project/commit/ab17ecd107670cd843a9074e4d0bc33810abcf5e
Author: ChiaHungDuan <chiahungduan at google.com>
Date: 2023-10-19 (Thu, 19 Oct 2023)
Changed paths:
M compiler-rt/lib/scudo/standalone/CMakeLists.txt
M compiler-rt/lib/scudo/standalone/allocator_config.h
A compiler-rt/lib/scudo/standalone/condition_variable.h
A compiler-rt/lib/scudo/standalone/condition_variable_base.h
A compiler-rt/lib/scudo/standalone/condition_variable_linux.cpp
A compiler-rt/lib/scudo/standalone/condition_variable_linux.h
M compiler-rt/lib/scudo/standalone/primary64.h
M compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
M compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
A compiler-rt/lib/scudo/standalone/tests/condition_variable_test.cpp
M compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
Log Message:
-----------
[scudo] Add ConditionVariable in SizeClassAllocator64 (#69031)
This may improve the waiting of `Region->MMLock` while trying to refill
the freelist. Instead of always waiting on the completion of
`populateFreeListAndPopBatch()` or `releaseToOSMaybe()`, `pushBlocks()`
also refills the freelist. This increases the chance of earlier return
from `popBatches()`.
The support of condition variable hasn't been done for all platforms.
Therefore, add another `popBatchWithCV()` and it can be configured in
the allocator configuration by setting `Primary::UseConditionVariable`
and the desired `ConditionVariableT`.
Reviewed By: cferris
Differential Revision: https://reviews.llvm.org/D156146
More information about the All-commits
mailing list