23 #ifndef IONMEMORYPLUGIN_H
24 #define IONMEMORYPLUGIN_H
26 #include <RdkPluginBase.h>
43 const std::shared_ptr<DobbyRdkPluginUtils> &utils,
44 const std::string &rootfsPath);
47 inline std::string
name()
const override
62 const std::map<std::string, uint64_t> &heapLimits,
63 uint64_t defaultLimit);
66 const std::string mName;
67 std::shared_ptr<rt_dobby_schema> mContainerConfig;
68 const std::shared_ptr<DobbyRdkPluginUtils> mUtils;
69 const std::string mRootfsPath;
72 const rt_defs_plugins_ion_memory_data *mPluginData;
Plugin used to setup the ION cgroup controller for the container.
Definition: IonMemoryPlugin.h:40
unsigned hookHints() const override
Set the bit flags for which hooks we're going to use.
Definition: IonMemoryPlugin.cpp:65
std::string findIonCGroupMountPoint() const
Attempts to get the mount points of the ION cgroup filesystem.
Definition: IonMemoryPlugin.cpp:187
bool createRuntime() override
OCI Hook - Run in host namespace. We use this point to create a cgroup and put the containered proces...
Definition: IonMemoryPlugin.cpp:84
bool setupContainerIonLimits(const std::string &cGroupDirPath, pid_t containerPid, const std::map< std::string, uint64_t > &heapLimits, uint64_t defaultLimit)
Creates a ion cgroup for the container and moves the container into it.
Definition: IonMemoryPlugin.cpp:254
std::string name() const override
Should return the name of the plugin.
Definition: IonMemoryPlugin.h:47
bool postStop() override
Poststop hook, we use this point to remove the cgroup directory created in the pre start phase.
Definition: IonMemoryPlugin.cpp:143
Basic object that provides the default overrides for a plugin.
Definition: RdkPluginBase.h:34