17 #ifndef __CGROUPS_ISOLATOR_SUBSYSTEMS_MEMORY_HPP__
18 #define __CGROUPS_ISOLATOR_SUBSYSTEMS_MEMORY_HPP__
53 virtual std::string
name()
const
59 const ContainerID& containerId,
60 const std::string&
cgroup);
63 const ContainerID& containerId,
64 const std::string&
cgroup);
67 const ContainerID& containerId,
68 const std::string&
cgroup);
71 const ContainerID& containerId,
76 const ContainerID& containerId,
77 const std::string&
cgroup);
80 const ContainerID& containerId,
81 const std::string&
cgroup);
96 MemorySubsystem(
const Flags& flags,
const std::string& hierarchy);
99 const ContainerID& containerId,
100 ResourceStatistics result,
101 const std::list<cgroups::memory::pressure::Level>& levels,
107 const ContainerID& containerId,
108 const std::string&
cgroup);
113 const ContainerID& containerId,
114 const std::string&
cgroup,
119 const ContainerID& containerId,
120 const std::string&
cgroup);
130 #endif // __CGROUPS_ISOLATOR_SUBSYSTEMS_MEMORY_HPP__
virtual ~MemorySubsystem()
Definition: memory.hpp:51
virtual process::Future< Nothing > cleanup(const ContainerID &containerId, const std::string &cgroup)
Clean up the cgroups subsystem for the associated container.
const std::string CGROUP_SUBSYSTEM_MEMORY_NAME
Definition: constants.hpp:48
Definition: resources.hpp:79
virtual process::Future< Nothing > recover(const ContainerID &containerId, const std::string &cgroup)
Recover the cgroups subsystem for the associated container.
const Flags flags
Flags used to launch the agent.
Definition: subsystem.hpp:176
Definition: hashmap.hpp:38
Represent cgroups memory subsystem.
Definition: memory.hpp:44
Result< std::string > cgroup(pid_t pid)
Try< std::vector< Entry > > list(const std::string &hierarchy, const std::string &cgroup)
An abstraction for cgroups subsystem.
Definition: subsystem.hpp:42
static Try< process::Owned< Subsystem > > create(const Flags &flags, const std::string &hierarchy)
virtual std::string name() const
The cgroups subsystem name of this Subsystem object.
Definition: memory.hpp:53
Level
Definition: cgroups.hpp:826
const std::string hierarchy
The hierarchy path of cgroups subsystem.
Definition: subsystem.hpp:181
virtual process::Future< ResourceStatistics > usage(const ContainerID &containerId, const std::string &cgroup)
Gather resource usage statistics of the cgroups subsystem for the associated container.
virtual process::Future< Nothing > update(const ContainerID &containerId, const std::string &cgroup, const Resources &resources)
Update resources allocated to the associated container in this cgroups subsystem. ...
virtual process::Future< Nothing > prepare(const ContainerID &containerId, const std::string &cgroup)
Prepare the cgroups subsystem for the associated container.
virtual process::Future< mesos::slave::ContainerLimitation > watch(const ContainerID &containerId, const std::string &cgroup)
Watch the container and report if any resource constraint impacts it.