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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83B78C433F5 for ; Fri, 1 Apr 2022 23:02:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233470AbiDAXD6 (ORCPT ); Fri, 1 Apr 2022 19:03:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231869AbiDAXD5 (ORCPT ); Fri, 1 Apr 2022 19:03:57 -0400 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8499C15D39D; Fri, 1 Apr 2022 16:02:06 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1naQHG-0002QZ-2v; Sat, 02 Apr 2022 01:01:58 +0200 Date: Sat, 2 Apr 2022 01:01:58 +0200 From: Florian Westphal To: Roman Gushchin Cc: Florian Westphal , Vasily Averin , Pablo Neira Ayuso , kernel@openvz.org, Jozsef Kadlecsik , netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH nft] nft: memcg accounting for dynamically allocated objects Message-ID: <20220401230158.GC28321@breakpoint.cc> References: <20220401120342.GC9545@breakpoint.cc> <7bfa2e2e-b22d-7561-661b-41ef7714caf5@linux.dev> <20220401193159.GB28321@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Roman Gushchin wrote: > On Fri, Apr 01, 2022 at 09:31:59PM +0200, Florian Westphal wrote: > > But what task/memcg is used for the accounting in that case? > > Root memcg/no accounting, which is the same. > > There is a way to account for a specific memcg in such cases, it's used for > bpf maps, for example. We save a pointer to the memcg which created the map and > charge it for all allocations from a !in_task context. Great, so we could use same scheme later on if its required for some use case. > so let's not do without regression tests and a serious need. Sounds good. Thanks.