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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user