bmahler commented on code in PR #559: URL: https://github.com/apache/mesos/pull/559#discussion_r1567740967
########## src/linux/cgroups2.hpp: ########## @@ -275,6 +275,24 @@ Try<Nothing> set_max(const std::string& cgroup, const Option<Bytes>& limit); // Cannot be used for the root cgroup. Result<Bytes> max(const std::string& cgroup); + +// Set the soft memory limit for a cgroup and its descendants. Exceeding the +// soft limit will cause processes in the cgroup to be throttled and put under +// heavy memory pressure. +// If limit is None, then there is no soft memory limit. +// Note: See the top-level `cgroups2::memory` comment about byte alignment. +// +// Cannot be used for the root cgroup. +Try<Nothing> set_soft_max( + const std::string& cgroup, const Option<Bytes>& limit); + + +// Get the soft memory limit for a cgroup and its descendants. +// If the returned limit is None, then there is no soft memory limit. +// +// Cannot be used for the root cgroup. +Result<Bytes> soft_max(const std::string& cgroup); Review Comment: let's just call this high and set_high to keep the cgroups terminology intact and avoid any confusion, we don't really want people to have to learn our own terminology here and how it maps to the cgroups terminology it seems to be called the "memory usage throttle limit" in cgroups v2 and fb's docs FWIW -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
