Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce lock contention in OutputBufferMemoryManager
Addresses lock contention bottlenecks in OutputBufferMemoryManager by: - Reducing the scope the critical section in updateMemoryUsage - Removing synchronization from isBufferFull() and isOverutilized(), these methods are already atomic reads - Avoiding redundant notifications when the blockedOnMemory future does not change or is already completed (aka: not blocked) - Avoiding spurious notifications from setNoBlockOnFull() when still blocked on memory - Adds an unsynchronized fast path in onMemoryAvailable() to skip the lock acquisition entirely when the buffer is full
- Loading branch information
1 parent
dff92fe
commit 641347b
Showing
1 changed file
with
91 additions
and
48 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