[all-commits] [llvm/llvm-project] 134cb8: [scudo] Use a tryLock in secondary release to OS (...
Christopher Ferris via All-commits
all-commits at lists.llvm.org
Tue Mar 25 16:32:37 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 134cb8877e0da3da5c9652c55196f7a1380fb207
https://github.com/llvm/llvm-project/commit/134cb8877e0da3da5c9652c55196f7a1380fb207
Author: Christopher Ferris <cferris1000 at users.noreply.github.com>
Date: 2025-03-25 (Tue, 25 Mar 2025)
Changed paths:
M compiler-rt/lib/scudo/standalone/secondary.h
Log Message:
-----------
[scudo] Use a tryLock in secondary release to OS (#132827)
In the caching part of the secondary path, when about to try to release
memory to the OS, we always wait while acquiring the lock. However, if
multiple threads are attempting this at the same time, all other threads
will likely do nothing when the release call is made. Change the
algorithm to skip the release if there is another release in process.
Also, pull the lock outside the releaseOlderThan function. This is so
that in the store path, we use the tryLock and skip if another thread is
releasing. But in the path where a forced release call is being made,
that call will wait for release to complete which guarantees that all
entries are released when requested.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list