mirror of https://github.com/mkerrisk/man-pages
clone.2: Note a performance benefit of CLONE_INTO_CGROUP
As noted in email by Christian Brauner: I forgot to mention that spawning directly into a target cgroup is also more efficient than moving it after creation. The specific reason is mentioned in the commit message [ef2c41cf38a], the write lock of the semaphore need not be taken in contrast to when it is moved afterwards. That implementation details is not that interesting but it might be interesting to know that it provides performance benefits in general. Reported-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
c0e4ab6356
commit
4fe3acd9e1
|
@ -571,6 +571,9 @@ This eliminates the accounting
|
|||
jitter that would be caused if the child process was first created in the
|
||||
same cgroup as the parent and then
|
||||
moved into the target cgroup.
|
||||
Furthermore, spawning the child process directly into a target cgroup
|
||||
is significantly cheaper than moving the child process into
|
||||
the target cgroup after it has been created.
|
||||
.IP *
|
||||
The
|
||||
.BR CLONE_INTO_CGROUP
|
||||
|
|
Loading…
Reference in New Issue