[all-commits] [llvm/llvm-project] 95ea37: [scudo] Added LRU eviction policy to secondary cac...

Joshua Baehring via All-commits all-commits at lists.llvm.org
Tue Jul 23 11:33:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 95ea37cd63f42ca0c0fa71621e75527e88c8b64d
      https://github.com/llvm/llvm-project/commit/95ea37cd63f42ca0c0fa71621e75527e88c8b64d
  Author: Joshua Baehring <98630690+JoshuaMBa at users.noreply.github.com>
  Date:   2024-07-23 (Tue, 23 Jul 2024)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/secondary.h

  Log Message:
  -----------
  [scudo] Added LRU eviction policy to secondary cache. (#99409)

The logic for emptying the cache now follows an LRU eviction policy.
When the cache is full on any given free operation, the oldest entry in
the cache is evicted, and the memory associated with that cache entry is
unmapped.

Finding empty cache entries is now a constant operation with the use of
a stack of available cache entries.

Through the LRU structure, the cache retrieval algorithm now only
iterates through valid entries of the cache. Furthermore, the retrieval
algorithm will first search cache entries that have not been decommitted
(i.e. madvise() has not been called on their corresponding memory
chunks) to reduce the likelihood of returning a memory chunk to the user
that would induce a page fault.



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