]> git.baikalelectronics.ru Git - kernel.git/commit
pidns: simpler allocation of pid_* caches
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 20 Mar 2018 18:51:06 +0000 (21:51 +0300)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 21 Mar 2018 14:40:17 +0000 (09:40 -0500)
commit3994c5492bcf1487e4356bb5a9a559c7387d4098
treeeaacdddc5f008401906b962ff1feb4a9cace9bfc
parentec86ef94f7e7b4fb720bc80e7ffb57326f152ab0
pidns: simpler allocation of pid_* caches

Those pid_* caches are created on demand when a process advances to the new
level of pid namespace. Which means pointers are stable, write only and
thus can be packed into an array instead of spreading them over and using
lists(!) to find them.

Both first and subsequent clone/unshare(CLONE_NEWPID) become faster.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
kernel/pid_namespace.c