Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1242534ioo; Sun, 22 May 2022 08:05:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziJaUP4b7kx1x4o9StJ9XPMTksO//avCyQSxA/MxniE/vfb5hSGkVA/72ipY9g0qhwz9/x X-Received: by 2002:a63:5625:0:b0:3db:55dd:37ae with SMTP id k37-20020a635625000000b003db55dd37aemr16299091pgb.611.1653231947891; Sun, 22 May 2022 08:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653231947; cv=none; d=google.com; s=arc-20160816; b=pqw3aeGsFBUz6pUrW4gdpRRu27EaAPO9n7A3TiQjxTJWZbMg4mrMn5+dZS7sCV/exS 6uAQXcJiazbsSJSyE+5VNTqDWmLToUdK96lE0ghTFhZGQSVd76iy/59j831ElkS7MXfH +WAAP/3XyBpuJuA2r1NzJPbrwSpNPP4pmJegSgriGCYdKH4/Eb/Uu9UgyAiiOensB9Oo UymNYwq42ozqABmEHhmgU4jA8bvIo9GRgBjnn80QDEG4pgFKx90OOqJexLYAn0EuRIXe SeU96SK+icz1ueX9s2Oz2EgZfc1KPRwZlEmGR2kN4YNKPZcIkTfInQDajQ9t+2BbJji3 EO8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=6CTUhgjUo83Du844ljegCXcw0SIVsWK556UKC8YwhGM=; b=zTS3b+LMBVgAxvPqv3VJs7Gh0IgxVf/aENCaVuS1y+hP0xZkGJ9ETrk3pqLFNcaFMT N5Q6KrvIDj++/P4RmgnNkLKJWIha+AjReqdtjg8rt0waClWNtLqkPCpqeSw+TkJtTDpO 1GH7CsZLhU/P+iXqNFh8PrXGxlVDOGGJyEBW3r2EDFc7+rL7Nzf4UJYOpytFFeU/lqEd atjA0x9X93qNmJ/8K2Fw3W0ApAPWyiAsE/Iu/VcF3TLT4FNoP2R/EOi9q32p3wobycni I6ilxkqvdIXf0bfpvNJUHad6pbmmE381wumOTmovE9Yp0ep7JpgHj2x8HqRrGq32SqeP JDOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=JjZ4zTDW; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a639245000000b003aa38e78d18si7070265pgn.488.2022.05.22.08.05.23; Sun, 22 May 2022 08:05:47 -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=@google.com header.s=20210112 header.b=JjZ4zTDW; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344371AbiETBTD (ORCPT + 99 others); Thu, 19 May 2022 21:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239345AbiETBTB (ORCPT ); Thu, 19 May 2022 21:19:01 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 605F938BE1 for ; Thu, 19 May 2022 18:19:00 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-2fef1441caaso59613427b3.6 for ; Thu, 19 May 2022 18:19:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=6CTUhgjUo83Du844ljegCXcw0SIVsWK556UKC8YwhGM=; b=JjZ4zTDWiB1nRfl2wC3BsM34tJOz6BnpAkzjM0rDRRpVqW5wr4jPCl1W10bF/oVI4i kfNM7xy1sWyNzlErQbLJpvvZ/eh+JUR3GuYKxZaVXVC/mGj8aPBDTqc5fXOqt77buNhq +3tlliTSlpw+P5FkV4v72rF54Y7mFmb6UIIDoyIUiN2peDKDKr8kcciBU+qG8ahNzUll Z9Dqqj8fvA05IoK2XUKC16G0CfibMIezwCct8opoG3bua8nGrcLUnsbXOaGFjQs1yumH g5HeiRKAieKuBxiN0Y/jWP2z6f2JaDWI3aqoDLsHvV3lWpnGPUnuA7p9+Ck3rklSRHIw I4MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=6CTUhgjUo83Du844ljegCXcw0SIVsWK556UKC8YwhGM=; b=RpMMbXqFwuHz8LL3tHLoyGlJt72cPW2E0fNdOy+/LO7dU1EJ9tu6mMi46Nh8mInh2p RqfgRIPj6WjzjZO6Zuk091NLSNvcoumCWOwYzBEsZnWUvEq2DR4iABtPeCq68+uTH+sY u/XRwT5h83wXsaFrdrVunCxSZ/425jvq1YaftU1JdNzw0oF3mLdblF4RfeILTm/V6Fe1 U3itQnhcafDPIYjtITeemT5ta6krUkyTuYMF6EG26h3EwToBrR9yUG8obNuzV77F6CAv dbZH7xFsSrikQaG0o8XL/SMiLy4iMTffhB3KRezetTtsTcQadhhm/TE83AbvVOCMZL/J 3ToA== X-Gm-Message-State: AOAM533nhf0aHbINF/UEwabIyDxwhXF4idMRJoNd3bp/dd9I+nMBckef ZK0LSzDDi+NOvhcOw5kkXpYsE3EyQ4UR0Q== X-Received: from shakeelb.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:28b]) (user=shakeelb job=sendgmr) by 2002:a25:9c03:0:b0:64b:968c:3a2a with SMTP id c3-20020a259c03000000b0064b968c3a2amr6954721ybo.57.1653009539588; Thu, 19 May 2022 18:18:59 -0700 (PDT) Date: Fri, 20 May 2022 01:18:57 +0000 In-Reply-To: <30f5b95a-db87-3924-6ad0-4c302c924ff0@openvz.org> Message-Id: <20220520011857.ggonbc32peagkhl2@google.com> Mime-Version: 1.0 References: <30f5b95a-db87-3924-6ad0-4c302c924ff0@openvz.org> Subject: Re: [PATCH 4/4] memcg: enable accounting for allocations in alloc_fair_sched_group From: Shakeel Butt To: Vasily Averin Cc: Roman Gushchin , "Michal =?utf-8?Q?Koutn=C3=BD?=" , kernel@openvz.org, linux-kernel@vger.kernel.org, Vlastimil Babka , Michal Hocko , cgroups@vger.kernel.org Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 Fri, May 13, 2022 at 06:52:20PM +0300, Vasily Averin wrote: > Creating of each new cpu cgroup allocates two 512-bytes kernel objects > per CPU. This is especially important for cgroups shared parent memory > cgroup. In this scenario, on nodes with multiple processors, these > allocations become one of the main memory consumers. > > Accounting for this memory helps to avoid misuse inside memcg-limited > contianers. > > Signed-off-by: Vasily Averin Acked-by: Shakeel Butt