lkml.org 
[lkml]   [2012]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] [RFC] pidns: don't zap processes several times
From
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.


\
 
 \ /
  Last update: 2012-10-08 20:01    [W:0.090 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site