Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5134718pxb; Mon, 28 Mar 2022 08:24:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrgDAr487w3Db7bcGaUY9h8/H8kaVXl/0wphBVtwXpgu/d4kjAWIjBwFAQJ3YyaRjenIss X-Received: by 2002:a17:903:22c6:b0:154:4156:f397 with SMTP id y6-20020a17090322c600b001544156f397mr26385798plg.29.1648481073844; Mon, 28 Mar 2022 08:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648481073; cv=none; d=google.com; s=arc-20160816; b=tBqTbQy80ZHQDYoOkT8ZAbDNBuO0IA2c2KN2k+/ZCbpiFX3XAR/70WI938igqcqU+E vM/XHYngrmMlcOcIvDGnOoZV9WMYVJJpdr2SB9PWx4SF33PcesjUXJ65slFc3z8Wr/QM vUHD4NL4dIi8CW/TAClXd04EHBUaKJCzBx6fAA6VCb1voIFXYC2SUWEHWQuFvFsf9Rpn 6iUTZIWfQkSc9L0Qzi0izTvOWtggUDHV4mdcIkahV/KlDSgZuKMn/anl+A+FdB3ooQ1P B8WMo/qsL5q9O44GwLU7fc/MdI3TZ01pDPdeDfQKyAv5GeBY0CUvbslACkZenjIjkNFF agJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:content-language:subject:from:mime-version:date :dkim-signature:message-id; bh=+jS168p1bb25ADdT8ax/fJafz6J3MhWjCNW24iJIjMs=; b=L1XwxU3fX+tW1NFZiPB1hOWSBlbQU4p2NujJrfJ7QYzTWIY6Pj5iXQUl9B/2LB2xBr nECKepijr8+I/00OIuwP+/dINjY+IMCxXrfrZdBf+ujP4xfycFqNh6prEq+wx44Kw2JX I/q0wS5ZACzWtl/ZKXUSLrUWKp790CeGAkuhVehx2QFVYnCrBy8VA2DiLaP2KJ/ms734 cnkBUhIq8U2lvqLnd5MEYO8tfdiRIsm6lSSZN8e8gcH2JLa1YW9Lb2ntCsMyPjGC60Nr XhNXgMWrbBmiLkWR6Vl5k1DmVrr9UD2jMIG+5wtaSUVkj1HyCGhpLleTiFeDZ+OfUgCy 5Yzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=XhelexXO; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020a056a00174100b004fa3a8dffaasi14703143pfc.97.2022.03.28.08.24.19; Mon, 28 Mar 2022 08:24:33 -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=@linux.dev header.s=key1 header.b=XhelexXO; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239762AbiC1JZY (ORCPT + 99 others); Mon, 28 Mar 2022 05:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239758AbiC1JZV (ORCPT ); Mon, 28 Mar 2022 05:25:21 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE56C12084; Mon, 28 Mar 2022 02:23:39 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1648459417; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+jS168p1bb25ADdT8ax/fJafz6J3MhWjCNW24iJIjMs=; b=XhelexXO80TCyU/GIdoxY1UXAAdTSIKYfzOsp1TqrHHrkaCwSRNUn9dmom0UNDWN1pCirR qzdlTPV1em0IhNc3Xfa/BIf9I5BwkVBIhZtGAOz+G5jCphqJwlt4o7ATMzeTZmeUVqrzIV kW+4G3OGwXGB39GwCDMjSdZUwjzr97Q= Date: Mon, 28 Mar 2022 12:23:35 +0300 MIME-Version: 1.0 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vasily Averin Subject: Re: [PATCH v2 RESEND] memcg: enable accounting for nft objects Content-Language: en-US To: Pablo Neira Ayuso Cc: Florian Westphal , Jozsef Kadlecsik , linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, kernel@openvz.org References: <20220228122429.GC26547@breakpoint.cc> <47f5c00f-86e8-98b5-0cff-3b9fcadb590c@linux.dev> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 3/28/22 11:15, Pablo Neira Ayuso wrote: > I think nft_*.c files whose NFT_EXPR_STATEFUL flag is set on need to > use this _ACCOUNT flag variant for objects that are dinamically > allocated from the packet path. Thank you for the hint. I think you're right in general, such objects should be accounted too. Though this requires additional research, because it is not clear for me, where proper memcg can be found. In case of nft it was quite easy, memcg was taken from current task. However, the objects you specified seem can be allocated in other contexts. Thank you, Vasily Averin