Messages in this thread | | | Date | Mon, 8 Oct 2012 21:10:28 +0400 | Subject | Re: [PATCH] [RFC] pidns: don't zap processes several times | From | Andrey Wagin <> |
| |
2012/10/7 Oleg Nesterov <oleg@redhat.com>: > On 10/07, Andrew Vagin wrote: >> >> I wrote a test program. It does clone(CLONE_NEWPID | CLONE_VM) and >> sleep(), a new task repeates the same actions. This program creates >> 4000 tasks. When I tried to kill all this processes, a system was >> inaccessible for some minutes. > > So this creates 4000 nested namespaces? Not sure this really needs the > fix... The size of pid would be more than 4000 * sizeof(struct upid). > > Perhaps we should MAX_PID_NS_LEVEL instead?
Yes, we can.
Could I just define MAX_PID_NS_LEVEL in a code: #define MAX_PID_NS_LEVEL ((PAGE_SIZE - offsetof(struct pid, numbers)) / sizeof(struct upid))
Or should it be added in a config? My opinion is that MAX_PID_NS_LEVEL can be defined, it will be 126 on x86_64. I don't know a usecase for which, it will be not enough. When someone finds a reasonable use case, it can be changed.
> > As for the patch, it looks correct at first glance. But,
I agree with all your comments.
Thanks.
| |