Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4949556rwb; Wed, 17 Aug 2022 08:32:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR54RTon1loLhBd470VyMjZsy00Jl4lgb3bJkATvtDMWu1c8Bc7lky74lys5y/aVm6ni3xim X-Received: by 2002:a17:90b:4d8e:b0:1f5:f65f:8d9f with SMTP id oj14-20020a17090b4d8e00b001f5f65f8d9fmr4357509pjb.171.1660750340992; Wed, 17 Aug 2022 08:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660750340; cv=none; d=google.com; s=arc-20160816; b=yGq8l8ULIWQtCCMddvTcE6ZxHvavopG/CiGz5oSPjR18iocaPkwFLm9LXltIXMcM9N IohQKSzQK09M+Q8wHogqw6rYFZNftmoMa9lBy+Ax8X9UtGa8p58wvNMBqFiwTyltfSYo tZ+L7MWoKc2dygZKY2XxeJx8TEZacJ8CUEWYWvORE9XiwB5kf175/9jAIj04aGa5bed9 EA20dOUi3vEqdlyhqidSTxK5l//ajahmTgORSVHvpKabIELQv0DmkVYc+lEOLJHDjQrZ LZKAR47VrQsTQiDu089/l2YaOxPmdoIftx+bPoMlYpg982oU+RHEB4IYwaN3qWeSgRTp Ddww== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=9SGSUQ251L49DEW5Gu8QCKtcNKe7pydvuZtzLIVhia0=; b=AG/B6mt7PpXn3C0UqestH2Au4+QUkGVUGm8zNV9ZcUnhWBG6MFIGnxA2fVIDyy4gzt e3eIxAkuu1MxCp4ZPMOzHmImdvjOsVCOz2MyNQUVpWCokdILwEG20D/YLF2yhN5lCe5C F2NQzz3DOZsSsu24sJsn2/Kimtq4IWRzsblMbXnO1LYE79psOX+tFPT+L2Dum8p6eY+6 Q2N8e+zZwA3pBA1QYP31+q/vHxdT6XpUwhxb4BWzO7prn4vCIUt/IzNV4Mi/ksYuOUS1 /jwR0LokVJYqrDZIPmGZ2ALRe2U0dmFKGn0XX1MvVb8UjRNNcAy2iWD4ORa8gplEl0ZM T4vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=xeNWp2vX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8-20020a170902724800b0017298ff3cf7si54246pll.466.2022.08.17.08.32.07; Wed, 17 Aug 2022 08:32:20 -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=@openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=xeNWp2vX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240789AbiHQPES (ORCPT + 99 others); Wed, 17 Aug 2022 11:04:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240753AbiHQPDz (ORCPT ); Wed, 17 Aug 2022 11:03:55 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D01F99F18B for ; Wed, 17 Aug 2022 08:03:00 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id l21so13834698ljj.2 for ; Wed, 17 Aug 2022 08:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=9SGSUQ251L49DEW5Gu8QCKtcNKe7pydvuZtzLIVhia0=; b=xeNWp2vXm4Z0cRNiYj00l46jraXiPR+4nfVnYkVGI1QJ4UhlDPCZRmQliccyeYiqOf nMfzkvngpIP+WYOAxKt2wsME3SvfQ4KueQv9XfFuWRXHGv2Tzqx1aT5i1yCI0B/XTkLm JQ6cPDEheS0M1D5dIZNb3w0wSCcvmYjV11qvtcY6vpA5OldQMLlOa5oGbcpPaJyA9B9V 5vafFBteAkq8jMOcv7JmKAhzomR4oRdXu5awUIGlo9OQIVTOJvpAU+Lpt+ftRIW9gCUj 2BF+r6tbooSgyj6Ok2sjbqEHh/9/3A1ziCg3uVOJOWkEaUvC9jZvAl5V4XLFNVzKLYrF oRMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=9SGSUQ251L49DEW5Gu8QCKtcNKe7pydvuZtzLIVhia0=; b=3v8WuwVc+JzGsKqtCiQUCrsOdINFoJyIvgLk2G61wl8f7d4y1Wlv2OcvxFxWz03W2z 5HIjj1m+tDMm3k2bLDg/TL9a30bxwaqeG/xCLTCay+SblIr22sOBTt+te5gZaj3p5Y9S Xn8KcMq18ajb0cAKvgtkedL94nlhILueNNi/lM0zmNjJjiwPLuXY+Hezq5fE67mY2CdQ enmo18p6mKexTq6OlZSIkpg3nzOg/dVwIleMQI+g/oEMLq4QtOSGmXQlhA6ifkk6CJ37 M2GUgnk8unBdRKUEnlSlTv6FLAH6SGwWiZFsjSxRapKW6x1zs9sNlyroY8hSejBU5or2 mkHg== X-Gm-Message-State: ACgBeo0EQUlbMQ6g7De27P2gaqbGTAKSPqwvUfLm0xMRMvG/793evn9Y H7mil1qxARF8R4O/FI4P+q5Yw4DvPwNvuQ== X-Received: by 2002:a05:651c:1988:b0:25e:c619:adb3 with SMTP id bx8-20020a05651c198800b0025ec619adb3mr8890843ljb.231.1660748577342; Wed, 17 Aug 2022 08:02:57 -0700 (PDT) Received: from [192.168.1.65] ([46.188.121.143]) by smtp.gmail.com with ESMTPSA id u16-20020a05651c131000b0025fdf9eec1dsm2251969lja.111.2022.08.17.08.02.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Aug 2022 08:02:56 -0700 (PDT) Message-ID: Date: Wed, 17 Aug 2022 18:02:55 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [RFC PATCH] memcg: adjust memcg for new cgroup allocations Content-Language: en-US To: =?UTF-8?Q?Michal_Koutn=c3=bd?= Cc: Roman Gushchin , tj@kernel.org, gregkh@linuxfoundation.org, hannes@cmpxchg.org, kernel@openvz.org, linux-kernel@vger.kernel.org, mhocko@suse.com, shakeelb@google.com, songmuchun@bytedance.com, viro@zeniv.linux.org.uk References: <62188f37-f816-08e9-cdd5-8df23131746d@openvz.org> <45a04b75-d61b-4c7a-7169-c971995a6049@openvz.org> <20220817091728.GA23229@blackbody.suse.cz> From: Vasily Averin In-Reply-To: <20220817091728.GA23229@blackbody.suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 8/17/22 12:17, Michal Koutný wrote: >> +static inline struct mem_cgroup *mem_cgroup_from_cgroup(struct cgroup *cgroup) > [...] >> + css = cgroup_get_e_css(cgroup, &memory_cgrp_subsys); >> + >> + if (css) >> + memcg = container_of(css, struct mem_cgroup, css); > Nit: mem_cgroup_from_css Yes, my fault, you are right. it was planned initially, but then I lost it somehow. Thank you very much! Vasily Averin