Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1902236pxb; Sat, 2 Apr 2022 07:38:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxue9q2hbASc2sCuEdyo/n2T3k1TV+IBnAWnGRO4RU3yef/b5Ql9xQmpqfvaI7mCctxRIKi X-Received: by 2002:a17:902:ccc4:b0:156:5d37:b42f with SMTP id z4-20020a170902ccc400b001565d37b42fmr11383603ple.157.1648910321376; Sat, 02 Apr 2022 07:38:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648910321; cv=none; d=google.com; s=arc-20160816; b=PVj9IgVth+iJdwsDKnLNzeSzFUrisY5PI/7lSRpOINb1k7yVtVXydUzGIoZgxEpXaK uxPxi0RS27ygtVw9PE+F3EEN45AkGyVt/cM00cxJ1MzsU8hvtAghxZt019JYvdUEa7cT vUWqO4BZlzWDqX3UYJszU1NK8x3QIO/W8I7tJcdeKzdd5Nct310c3nuxxRXO7ljPLD6w veq/15zQ4PXgHusV78YiRCvVeLlZSsBxLCEPObl7X2sZA7dqmIj64g7zHFfxeO06IL2C js2+4BYhK6Q4YeaHtI2A1OZhCh4Cw1sv1okH0hCfKVkKAgwg4BvVfwNTNxkPZF+qabDO RAdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=oDnDgSkY2xCTRHA0DyV9VAlqpuNZVRrjAAhd1Quh9yA=; b=I+3vKdrZOKtdU4Y6/LGSRu5USjLoSmCmbJWMv1CBW2LGeiLZ/Zdn3qyYDfE/59/V0X imxn0LB8ajy2zW2i3UqwGPdyAEO1Av4jxi9pcMTtXQtY8W/Txn6gi+329UkkcsPgDeqB VL76sfsPoGS2rLNc6k+QWuc+XLSHv2eJGHb8Txsixmr2qp7BdoFeiAgMJYLAJeh65lHN X0SKJrEV/kmpGOfOWr51k4Bt7oLOQTrP6gqDWIfKQTVLrRYSostdsnDXzfo7wqRDVLBu tKglYiWqhyyaPHFIlbFqJOFVJmEPd8LJ3s3GVDc7MgZVypDb2uS71ueJJ8hoeX46nuR2 ADXA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a056a00140a00b004fa3a8dff7asi5107369pfu.49.2022.04.02.07.38.27; Sat, 02 Apr 2022 07:38:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241208AbiDAXD6 (ORCPT + 99 others); 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) X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,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 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.