Resource limits constrain a process's usage of a specific resource.
structure, defined in
constains statistics about process resource usage.
This can be retrieved via the
syscall, which uses the underlying
function, defined in the
structure, also defined in
defines the soft and hard limits of a specified resource.
The list of IDs for resources governed by resource limits are defined in the
Resource limits can be retrieved with the
syscall, or set with the
syscall. Both use the underlying
function, and all are defined in the
Control groups provide a more powerful way to constrain resource usage over a group of processes. These make them ideal for use in container environments. The cgroups v1 and v2 implementations are both still in use, and supported by the Linux kernel infrastructure.
Cgroup functionality is implemented in the
directory. Of particular interest are the
file, which implements most of the functionality of cgroups v1, and the
file, which implements most of the cgroups v2 functionality.
function, which is in the
file, runs various functions to create new namespaces, depending on the namespace types specified.
Relevant to the today's discussion is
file, which copies a cgroups namespace to a new one.