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 X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C422C433E0 for ; Wed, 24 Jun 2020 01:40:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DF02D20702 for ; Wed, 24 Jun 2020 01:40:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="JI0RRpdx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF02D20702 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 667296B0002; Tue, 23 Jun 2020 21:40:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 617236B0003; Tue, 23 Jun 2020 21:40:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 506046B0005; Tue, 23 Jun 2020 21:40:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 364626B0002 for ; Tue, 23 Jun 2020 21:40:55 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BF7E3181AC9CB for ; Wed, 24 Jun 2020 01:40:54 +0000 (UTC) X-FDA: 76962401628.10.shoe06_220150126e40 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 9948E16A069 for ; Wed, 24 Jun 2020 01:40:54 +0000 (UTC) X-HE-Tag: shoe06_220150126e40 X-Filterd-Recvd-Size: 3628 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 01:40:54 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id y18so384060lfh.11 for ; Tue, 23 Jun 2020 18:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7AXmVyb4ZR5anHjnEEP5lE07L2REc/wDlQONbF/NhLI=; b=JI0RRpdxirb+Gh2KoBXbz8SOkuA9b9Qo7D6Hqe8TJpvOVPbbFBzd7kgVtjuEAIaYQZ RmwROV6VluY7B6Hu+Ec5RslA2mQ3IlrQq3NoThLJur5WKMqcFrNudIjvhV/TeC2YR0Pw ReZbsLgQTLwj0aZobzD70P7hguTY+gnR4IQ1wN1GtQBF0ycbTG1PuJzxPYjd9bxXO7k3 j6WieG4FTp2gmxZbOBMVNwBAjU4Mi1swYtN0eYouBPDUjyyswVYhqMa+39NLbPaaYhD0 /Sd2D2cUJLkDlgk2871dKEnFbF6HsGmfJDVtAAWgC94PZyHXbJzB0H5chn+K+d7zPc4v P5Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7AXmVyb4ZR5anHjnEEP5lE07L2REc/wDlQONbF/NhLI=; b=ceeK04ck80pp+ZFRo2meqfMq2JH+LAdwVPyLZbbaWUoO2JN/SIHY5IeKs8MRd3QkO7 Ei5O4e8wJpnu2jmmZLu2MsvekkZfw+ZzW0yxLCTekJLvo0sOYDYD0/lmajKPwIW/JtX0 PTTIlBca/GH5+g5+l6L37zWPbunF+FGQIV+WwDH1xWIA2aAz2NH3eyYgcibAzNjGwBqB DshV35AgbMnLC0NKHNYHalgLdbb5UciRrPMhxT0Q6hq0fH0iEV9HKK8h5r12ZAtO6bN7 GnBq3R2IM7FfA7aiuClHvX3A/qgrVUwyLfJjriRvu4g5KwaGrU+/cx16NBA0BwlVa0mx TwjQ== X-Gm-Message-State: AOAM533+CEBbEVNZKSRrs0P6No3hg9RYLXf00faA6jm2gjKzbunZUOOB +6cDkF3fh3K/VVxgL7gW3hu6fRPDIBYDSwCEjz/Pcg== X-Google-Smtp-Source: ABdhPJxWV0QhUDCH+O/O+AiqN2PIezT/rgZ9bpzxIAFJ636PeSwft1lwnUGptprATVEp+aywmYkTADbjHiRqqXggxCI= X-Received: by 2002:a19:8806:: with SMTP id k6mr13942713lfd.189.1592962852427; Tue, 23 Jun 2020 18:40:52 -0700 (PDT) MIME-Version: 1.0 References: <20200623184515.4132564-1-guro@fb.com> <20200623184515.4132564-5-guro@fb.com> In-Reply-To: <20200623184515.4132564-5-guro@fb.com> From: Shakeel Butt Date: Tue, 23 Jun 2020 18:40:41 -0700 Message-ID: Subject: Re: [PATCH v3 4/5] mm: memcg: charge memcg percpu memory to the parent cgroup To: Roman Gushchin Cc: Andrew Morton , Dennis Zhou , Tejun Heo , Christoph Lameter , Johannes Weiner , Michal Hocko , Linux MM , Kernel Team , LKML Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9948E16A069 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000974, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 23, 2020 at 11:47 AM Roman Gushchin wrote: > > Memory cgroups are using large chunks of percpu memory to store vmstat > data. Yet this memory is not accounted at all, so in the case when there > are many (dying) cgroups, it's not exactly clear where all the memory is. > > Because the size of memory cgroup internal structures can dramatically > exceed the size of object or page which is pinning it in the memory, it's > not a good idea to simple ignore it. It actually breaks the isolation *simply > between cgroups. > > Let's account the consumed percpu memory to the parent cgroup. > > Signed-off-by: Roman Gushchin > Acked-by: Dennis Zhou Reviewed-by: Shakeel Butt