Skip to content

Commit 32d0f81

Browse files
igchorfacebook-github-bot
authored andcommitted
Prepare findEviction to be extended for multiple memory tiers (#166)
Summary: This PR refactors the eviction logic (inside `findEviction`) so that it will be easy to add support for multiple memory tiers. Problem with multi-tier configuration is that the critical section under MMContainer lock is too long. To fix that we have implemented an algorithm which utilize WaitContext to decrease the critical section. (which will be part of future PRs). The idea is to use `moving` (now `exclusive`) bit to synchronize eviction with SlabRelease (and in future, with readers). In this PR, I only changed how `findEviction` synchronizes with SlabRelease. This PR is a subset of: #132 The above PR introduced some performance regressions in the single-memory-tier version which we weren't able to fix yet, hence we decided to first implement this part (which should not affect performance) and later we can add separate path for multi-tier or try to optimize the original patch. Pull Request resolved: #166 Test Plan: Imported from GitHub, without a `Test Plan:` line. CPU (A-B). Verified A/B and B/A have no noticeable cpu difference. https://pxl.cl/2jDfg Reviewed By: jaesoo-fb Differential Revision: D40360742 Pulled By: therealgymmy fbshipit-source-id: 96b416b07e67172ac797969ca374ecb1267ac5bb
1 parent d8db9e4 commit 32d0f81

File tree

7 files changed

+282
-298
lines changed

7 files changed

+282
-298
lines changed

0 commit comments

Comments
 (0)