From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 260CEC433EF for ; Fri, 1 Jul 2022 11:03:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A1F156B0071; Fri, 1 Jul 2022 07:03:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CEFC6B0073; Fri, 1 Jul 2022 07:03:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8969D6B0074; Fri, 1 Jul 2022 07:03:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 7C25A6B0071 for ; Fri, 1 Jul 2022 07:03:53 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 58AF960BF3 for ; Fri, 1 Jul 2022 11:03:53 +0000 (UTC) X-FDA: 79638245946.14.6019226 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf15.hostedemail.com (Postfix) with ESMTP id A1506A0048 for ; Fri, 1 Jul 2022 11:03:52 +0000 (UTC) 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: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656673432; a=rsa-sha256; cv=none; b=Uo1DJdI2goJPcZvqffvSYQGXiwgArf3R3TTs4AGHbNBs7Kv7ztRjNnUUt5YeMN5+R54B9O yoRAjzELEgef6uxBrh/mWX+dRiH9y+8PvIkArb8hCx4Q62Mx2pzHBLY9vHncv6vNYbeVgn 4ZCC0VmHyoJMoe2Ov9ZBSfncn15t0Y8= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=WWJPQ2EX; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf15.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656673432; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=EQQ0uDHhygYXehLqsJhyCr+6to0zpT4yOYb+B/7ePOc=; b=A9D63lTaoeu4YqVLqoOtpJGtuKx//w/tNITCLDcMXDIelgufcm9lEIPx04A8R/PZ1bPQuo NCSXEEfw1OrWtu1Gkuu9iw+gkR+Utv+FGB0uVgPFi1yobzkea2o2DX52PjEVeK/JXClJhx L8FLoor8wVanJeBV31CnY9wJPX9Wfuk= X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A1506A0048 Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=WWJPQ2EX; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf15.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Rspam-User: X-Stat-Signature: 7ucd9ubpmb4hfzokp4c8usxojugjww75 X-HE-Tag: 1656673432-299687 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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