Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754249Ab2JHRKe (ORCPT ); Mon, 8 Oct 2012 13:10:34 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:44455 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752952Ab2JHRK3 (ORCPT ); Mon, 8 Oct 2012 13:10:29 -0400 MIME-Version: 1.0 In-Reply-To: <20121007190118.GA16068@redhat.com> References: <1349603358-1085282-1-git-send-email-avagin@openvz.org> <20121007190118.GA16068@redhat.com> Date: Mon, 8 Oct 2012 21:10:28 +0400 Message-ID: Subject: Re: [PATCH] [RFC] pidns: don't zap processes several times From: Andrey Wagin To: Oleg Nesterov Cc: linux-kernel@vger.kernel.org, Andrew Morton , Serge Hallyn , Paul Gortmaker , "Eric W. Biederman" , Vasiliy Kulikov , Cyrill Gorcunov , Pavel Emelyanov Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1254 Lines: 35 2012/10/7 Oleg Nesterov : > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/