This is an automated email from the ASF dual-hosted git repository.
bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 43e65760a [cgroups2] populate unevictable field from memory.stat
43e65760a is described below
commit 43e65760af52dd286e30a753fd87325c1e67cd6e
Author: None <None>
AuthorDate: Wed May 15 17:44:12 2024 -0400
[cgroups2] populate unevictable field from memory.stat
Review: https://reviews.apache.org/r/74991/
---
src/linux/cgroups2.cpp | 1 +
src/linux/cgroups2.hpp | 3 +++
2 files changed, 4 insertions(+)
diff --git a/src/linux/cgroups2.cpp b/src/linux/cgroups2.cpp
index 2057b3292..e9845bb56 100644
--- a/src/linux/cgroups2.cpp
+++ b/src/linux/cgroups2.cpp
@@ -895,6 +895,7 @@ Try<Stats> parse(const string& content)
else if (key == "vmalloc") { stats.vmalloc = bytes; }
else if (key == "file_mapped") { stats.file_mapped = bytes; }
else if (key == "slab") { stats.slab = bytes; }
+ else if (key == "unevictable") { stats.unevictable = bytes; }
kernel_found |= key == "kernel";
}
diff --git a/src/linux/cgroups2.hpp b/src/linux/cgroups2.hpp
index ecac09d9b..97260c0d6 100644
--- a/src/linux/cgroups2.hpp
+++ b/src/linux/cgroups2.hpp
@@ -297,6 +297,9 @@ struct Stats
// Amount of memory used for storing in-kernel data structures.
Bytes slab;
+
+ // Amount of memory that cannot be reclaimed.
+ Bytes unevictable;
};