Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(*initProcess).start: rm second Apply
Apply() determines and creates cgroup path(s), configures parent cgroups (for some v1 controllers), and creates a systemd unit (in case of a systemd cgroup manager), then adds a pid specified to the cgroup for all configured controllers. This is a relatively heavy procedure (in particular, for cgroups v1 it involves parsing /proc/self/mountinfo about a dozen times), and it seems there is no need to do it twice. More to say, even merely adding the child pid to the same cgroup seems redundant, as we added the parent pid to the cgroup before sending the data to the child (runc init process), and it waits for the data before doing clone(), so its children will be in the same cgroup anyway. Signed-off-by: Kir Kolyshkin <[email protected]>
- Loading branch information