Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1268186lfc; Wed, 1 Jun 2022 13:39:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwe8LaK6kDtQJpfn+yiNr3Q+8oCHsI2CS46/JZZuSx9Utc8axjyIhIokr4RwoPSFmRpHwvV X-Received: by 2002:a62:b515:0:b0:50a:3d51:671e with SMTP id y21-20020a62b515000000b0050a3d51671emr1352189pfe.48.1654115940464; Wed, 01 Jun 2022 13:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654115940; cv=none; d=google.com; s=arc-20160816; b=VYMablAUhLG1X7AQjyFZK3A/HENdRRfe62G4sNsBwx1AisWcbDuoUCQHl1CgXaDexV aQVd+zzpCZt7V5Uk6/VebzVrDVCYn6EFcCK/S+WXqzFLw+638g0/qx2yzbkBdiXaQOlx hpumwPLzHBLjxdRSWEcrruP/CO24+bLUPEoaiobD1pIdLB1ee+2q17wZchLc4cFo6I+X BPvFtKXbiEq738j4/VTbiAQmFRLGgPUN5V4HPF6tTZs7NJRQW7uEW+W2wLZ34alcr9L2 qbRQxyRi1qfMoDnRKqPE4XB2TVdi0h1aoPEaMNDuKY1u0di4MlteC8fTcpueYvV7IpMB W7yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lTCJZ2bUJ3/puiljHjqguHJc4A3/gQf69h4JgyxoJlI=; b=Ja5eoyJVznG+USvVZApoHgAcacdVwuIYzJGjtKyfTLlhNA/mdb6Lbwsu0voxrfqNxC Jl8Ai2hCjDI31Cp0bFWh0yeoqR60246q08QHimhgjKx1yLTMJCUHNgc+GxLThKXMfSzt o+ISBS2TuiLMhPoKIHvOK8B/i1BtTVd95utn5KUgCIfnM7+WURWubbuhAnkgnP94RlGa 2CluayMXWcvjvDh1+lboLcRkKvC9zN89loWit0gCcXqwL1qjVbjDKwG3Xws80TbOha7p aX6dDCMWfGk2hXUZi0e27MHzhcFPaVvHzBGet2Ic4LxfO8e50WFQIUYpcwIwlaEv7R1S j7wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gFUeOb8s; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q14-20020a056a00084e00b004fa687c28d4si3735988pfk.86.2022.06.01.13.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:39:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gFUeOb8s; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8C3012864BE; Wed, 1 Jun 2022 12:50:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351103AbiFAJcc (ORCPT + 99 others); Wed, 1 Jun 2022 05:32:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351057AbiFAJc2 (ORCPT ); Wed, 1 Jun 2022 05:32:28 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BB7081984; Wed, 1 Jun 2022 02:32:27 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 3667F1F948; Wed, 1 Jun 2022 09:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1654075946; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lTCJZ2bUJ3/puiljHjqguHJc4A3/gQf69h4JgyxoJlI=; b=gFUeOb8srA+PPm1aBMyMYbScxooALNkP7f+l3huThUfo2iW4yr72417wNGGyK/OlXpcPL/ CZD6KvjeCnXkleDBG3qgI6oFqj3++xOy6Su3SsLn8pfvSSd964/MDyxteGjPtYE2YXJx+/ Kf1LS61x+N8X6OviXR2U8LNH8VOq2v0= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id F32D42C141; Wed, 1 Jun 2022 09:32:25 +0000 (UTC) Date: Wed, 1 Jun 2022 11:32:25 +0200 From: Michal Hocko To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: Vasily Averin , Andrew Morton , kernel@openvz.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Shakeel Butt , Roman Gushchin , Vlastimil Babka , Muchun Song , cgroups@vger.kernel.org Subject: Re: [PATCH mm v3 0/9] memcg: accounting for objects allocated by mkdir cgroup Message-ID: References: <06505918-3b8a-0ad5-5951-89ecb510138e@openvz.org> <3e1d6eab-57c7-ba3d-67e1-c45aa0dfa2ab@openvz.org> <3a1d8554-755f-7976-1e00-a0e7fb62c86e@openvz.org> <118bcb39-1281-0d1d-b163-3f6bcc99c3e2@openvz.org> <20220601091543.GA21320@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220601091543.GA21320@blackbody.suse.cz> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 01-06-22 11:15:43, Michal Koutny wrote: > On Wed, Jun 01, 2022 at 06:43:27AM +0300, Vasily Averin wrote: > > CT-901 /# cat /sys/fs/cgroup/memory/cgroup.subgroups_limit > > 512 > > CT-901 /# echo 3333 > /sys/fs/cgroup/memory/cgroup.subgroups_limit > > -bash: echo: write error: Operation not permitted > > CT-901 /# echo 333 > /sys/fs/cgroup/memory/cgroup.subgroups_limit > > -bash: echo: write error: Operation not permitted > > > > I doubt this way can be accepted in upstream, however for OpenVz > > something like this it is mandatory because it much better > > than nothing. > > Is this customization of yours something like cgroup.max.descendants on > the unified (v2) hierarchy? (Just curious.) > > (It can be made inaccessible from within the subtree either with cgroup > ns or good old FS permissions.) So we already do have a limit to prevent somebody from running away with the number of cgroups. Nice! I was not aware of that and I guess this looks like the right thing to do. So do we need more control and accounting that this? -- Michal Hocko SUSE Labs