Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1158171imi; Fri, 1 Jul 2022 04:26:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uC6U3vqhuUiFgGL1w2/zWcJBqYphUWJ2rMmARFRKw1SmiXPEsqAUEsWaX2/Px4TqZJ9VaM X-Received: by 2002:a05:6402:248d:b0:437:dd4c:e70e with SMTP id q13-20020a056402248d00b00437dd4ce70emr16652168eda.75.1656674807796; Fri, 01 Jul 2022 04:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656674807; cv=none; d=google.com; s=arc-20160816; b=FFmvi67zz0SzwY6P6ZkomYFJauAnyfRp5GMeZ6yEBcQW8mbAXMvrkAXarBFo1JQ0BQ Ylze8AnlhI24ASjdVc86Jw8Dw8e7P2noI0i8YzNsjOtmqslT+Mx7GJ2nJIGK+4IjaBXO 5CV44l3Orj7Zz6CI04O44ohRzymKhZWa7TFgsgYi2jxh0GbIS5VcuHj3QfF1Gbfi1fzU M6+Skn9HprhYIxhr38M9qwNZU5FJsZX7vS+m4lBDHuFORivB3lLnMMJDbO0Q/jYjnNtM 9HvomO577iZyPiUItdZ6CqvtzVG/ihoOEZq9LUOMSNX3q+2etEKQbNufYRFDSUb9W68R fmBQ== 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=EQQ0uDHhygYXehLqsJhyCr+6to0zpT4yOYb+B/7ePOc=; b=qk/vm+21kmV8jOJkpYXqNTwBhoqhr7sjrykiA0tF1Q8CTNE0ahph0xc/K3ovJIIDFL JeIvtGA0Zb02vLsqf+l6Z+NVN8uXMkVlvfA0BBJDI5pV8JDHWNTG/CzXrSjWNSOuDAM3 NMPqjZ/sYGTtwxhnmi/iFq5vu6TgEKWF4thkt1wHfEoE5jUzY+WYjc9U9dMfqNw0Qir1 bL+lQkcC8ip3lLrnjG80uDGvjdTaSeIRk56aFg16G0a7+LnwLCtdjHGiTkoI/4a8CP5/ sVXzgOFzNjjHaQv+cpKDdvQUTUl6UW2ERc0FWSfT9eWw4bOmbHhkePdtaItT6B7aL1l9 r6Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=WWJPQ2EX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a50d553000000b0042b370f9819si27644889edj.552.2022.07.01.04.26.22; Fri, 01 Jul 2022 04:26:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=WWJPQ2EX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233132AbiGALDy (ORCPT + 99 others); Fri, 1 Jul 2022 07:03:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiGALDx (ORCPT ); Fri, 1 Jul 2022 07:03:53 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61D7238BF5; Fri, 1 Jul 2022 04:03:52 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 1D068220B1; Fri, 1 Jul 2022 11:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1656673431; 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=EQQ0uDHhygYXehLqsJhyCr+6to0zpT4yOYb+B/7ePOc=; b=WWJPQ2EXAZR1zW9+IVv5suuOU1NIHYrBg7iDSfv1oLM8W8yVOIyB5PnitFb/O8WjrQ65cw Rz3zvj+Qg7utK8xqKR8INSt6F2FnWqIzRi9ByD9vyq9spx9KQ6lUiOWwAHhO7EBzxT6J0J rcITBGmSTcrqyllxoSdrgRADn4cis5g= 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 9BFAC2C141; Fri, 1 Jul 2022 11:03:50 +0000 (UTC) Date: Fri, 1 Jul 2022 13:03:47 +0200 From: Michal Hocko To: Shakeel Butt Cc: Vasily Averin , kernel@openvz.org, Andrew Morton , LKML , Linux MM , Roman Gushchin , Michal =?iso-8859-1?Q?Koutn=FD?= , Vlastimil Babka , Muchun Song , Cgroups Subject: Re: [PATCH mm v5 0/9] memcg: accounting for objects allocated by mkdir, cgroup Message-ID: References: <4e685057-b07d-745d-fdaa-1a6a5a681060@openvz.org> <0fe836b4-5c0f-0e32-d511-db816d359748@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon 27-06-22 09:37:14, Shakeel Butt wrote: > On Fri, Jun 24, 2022 at 6:59 AM Michal Hocko wrote: [...] > > Is it even possible to prevent from id > > depletion by the memory consumption? Any medium sized memcg can easily > > consume all the ids AFAICS. > > Though the patch series is pitched as protection against OOMs, I think > it is beneficial irrespective. Protection against an adversarial actor > should not be the aim here. IMO this patch series improves the memory > association to the actual user which is better than unattributed > memory treated as system overhead. Considering the amount of memory and "normal" cgroup usage (I guess we can agree that delegated subtrees do not count their cgroups in thousands) is this really something that is worth bothering with? I mean, these patches are really small and not really disruptive so I do not really see any problem with them. Except that they clearly add a maintenance overhead. Not directly with the memory they track but any future cgroup/memcg metadata related objects would need to be tracked as well and I am worried this will get quickly out of sync. So we will have a half assed solution in place that doesn't really help any containment nor it provides a good and robust consumption tracking. All that being said I find these changes rather without a great value or use. -- Michal Hocko SUSE Labs