dirty_memory_manager: add functions to manipulate real dirty

There are times in which we want to add and remove real dirty memory
without impacting virtual dirty. One such example is the cache update
process, where real dirty is the limiting factor.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
This commit is contained in:
Glauber Costa
2017-10-12 16:10:45 -04:00
parent a6b2226562
commit b02ab991b9

View File

@@ -189,6 +189,14 @@ public:
_dirty_bytes_released_pre_accounted += delta;
}
void pin_real_dirty_memory(int64_t delta) {
_real_region_group.update(delta);
}
void unpin_real_dirty_memory(int64_t delta) {
_real_region_group.update(-delta);
}
size_t real_dirty_memory() const {
return _real_region_group.memory_used();
}