[PATCH] D82031: [scudo][standalone] Release smaller blocks less often

Christopher Ferris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 18:35:21 PDT 2020


cferris added a comment.

I figured out what is causing the performance difference in the 32 bit std::map benchmarks. It's not the allocations that are causing the difference but the initialization of the memory returned by the allocation. In the regressed case, there are no release to the OS and the initialization of the memory takes longer. In the original case, there is a some memory released, and the initialization of the memory takes less time. My guess is that the kernel in 32 bit processes only keeps so many cached pages, and by releasing some of the memory, the kernel is better at figuring out what to evict. This might also be a purely chip based regression and other chips don't exhibit the same issue if they have larger caches.

At any rate, this slight regression is not a regression in the allocation speed itself. It's possible this is also causing an issue with the memory replays in 32 bit processes, but I think that's less likely.

Therefore, I think this change is fine as is.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82031/new/

https://reviews.llvm.org/D82031





More information about the llvm-commits mailing list