[all-commits] [llvm/llvm-project] 643bf6: [scudo] Add partial chunk heuristic to retrieval a...
Joshua Baehring via All-commits
all-commits at lists.llvm.org
Mon Aug 26 10:45:00 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 643bf6cb01bc3faa54c5510c904ea3bdcb4bf42f
https://github.com/llvm/llvm-project/commit/643bf6cb01bc3faa54c5510c904ea3bdcb4bf42f
Author: Joshua Baehring <98630690+JoshuaMBa at users.noreply.github.com>
Date: 2024-08-26 (Mon, 26 Aug 2024)
Changed paths:
M compiler-rt/lib/scudo/standalone/secondary.h
M compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
Log Message:
-----------
[scudo] Add partial chunk heuristic to retrieval algorithm. (#105009)
Previously the secondary cache retrieval algorithm would not allow
retrievals of memory chunks where the number of unused bytes would be
greater than than `MaxUnreleasedCachePages * PageSize` bytes. This meant
that even if a memory chunk satisfied the requirements of the optimal
fit algorithm, it may not be returned. This remains true if memory
tagging is enabled. However, if memory tagging is disabled, a new
heuristic has been put in place. Specifically, If a memory chunk is a
non-optimal fit, the cache retrieval algorithm will attempt to release
the excess memory to force a cache hit while keeping RSS down.
In the event that a memory chunk is a non-optimal fit, the retrieval
algorithm will release excess memory as long as the amount of memory to
be released is less than or equal to 4 Pages. If the amount of memory to
be released exceeds 4 Pages, the retrieval algorithm will not consider
that cached memory chunk valid for retrieval.
This change also addresses an alignment issue in a test case submitted
in #104807.
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