The reclaimable file cache of one group, from its memory.stat, in the two forms the guard uses (cache_credit_from_stat in the header has the rules). A memory.stat that is missing gives no credit - not an unknown sample.
| 183 | // (cache_credit_from_stat in the header has the rules). A memory.stat that is missing gives no credit - not an |
| 184 | // unknown sample. |
| 185 | CacheCredit reclaimable_cache(const fs::path& dir, uint64_t current, bool v1) { |
| 186 | std::ifstream stat(dir / "memory.stat"); |
| 187 | if (!stat) return {}; |
| 188 | std::ostringstream text; |
| 189 | text << stat.rdbuf(); |
| 190 | return cache_credit_from_stat(text.str(), current, v1); |
| 191 | } |
| 192 | |
| 193 | // What the cgroup files say: every finite limit with the usage charged against it (and the cache credits of that |
| 194 | // group), and the usage and credit of the topmost visible group (the root of this namespace - what a container's own |
no test coverage detected