HPA: Generalize purging.

Previously, we would purge a hugepage only when it's completely empty.  With
this change, we can purge even when only partially empty.  Although the
heuristic here is still fairly primitive, this infrastructure can scale to
become more advanced.
This commit is contained in:
David Goldblatt
2020-12-02 22:24:15 -08:00
committed by David Goldblatt
parent 70692cfb13
commit 30b9e8162b
5 changed files with 208 additions and 64 deletions

View File

@@ -169,6 +169,7 @@ TEST_BEGIN(test_hugify) {
expect_false(hpdata_changing_state_get(&hpdata), "");
hpdata_hugify_begin(&hpdata);
expect_true(hpdata_changing_state_get(&hpdata), "");
hpdata_hugify_end(&hpdata);
expect_false(hpdata_changing_state_get(&hpdata), "");