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 fd42451e3 [cgroups2] Add constants for cgroup2 controls.
fd42451e3 is described below

commit fd42451e3b501b0207e0af0eb98c49a65cac834b
Author: Devin Leamy <dle...@twitter.com>
AuthorDate: Thu Feb 8 10:08:49 2024 -0500

    [cgroups2] Add constants for cgroup2 controls.
    
    Make all cgroup2 controls names constants that are available from:
    ```
      cgroups2::control::<control>
    ```
    
    Review: https://reviews.apache.org/r/74873
---
 src/linux/cgroups2.cpp | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/linux/cgroups2.cpp b/src/linux/cgroups2.cpp
index b42a012bc..ec7ba9e40 100644
--- a/src/linux/cgroups2.cpp
+++ b/src/linux/cgroups2.cpp
@@ -35,6 +35,25 @@ const string FILE_SYSTEM = "cgroup2";
 const string MOUNT_POINT = "/sys/fs/cgroup";
 
 
+namespace control {
+
+// Interface files found in all cgroups.
+const std::string CONTROLLERS = "cgroup.controllers";
+const std::string EVENTS = "cgroup.events";
+const std::string FREEZE = "cgroup.freeze";
+const std::string IRQ_PRESSURE = "irq.pressure";
+const std::string KILL = "cgroup.kill";
+const std::string MAX_DEPTH = "cgroup.max.depth";
+const std::string MAX_DESCENDANTS = "cgroup.max.descendants";
+const std::string PRESSURE = "cgroup.pressure";
+const std::string PROCESSES = "cgroup.procs";
+const std::string STATS = "cgroup.stat";
+const std::string SUBTREE_CONTROLLERS = "cgroup.subtree_control";
+const std::string THREADS = "cgroup.threads";
+const std::string TYPE = "cgroup.type";
+
+} // namespace control {
+
 bool enabled()
 {
   Try<bool> supported = mesos::internal::fs::supported(cgroups2::FILE_SYSTEM);

Reply via email to