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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 D9A95C63777 for ; Mon, 30 Nov 2020 21:01:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 67D2A2073C for ; Mon, 30 Nov 2020 21:01:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="OR7LHevB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67D2A2073C 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 AF2896B0036; Mon, 30 Nov 2020 16:01:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AA0066B005C; Mon, 30 Nov 2020 16:01:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B7A38D0001; Mon, 30 Nov 2020 16:01:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0027.hostedemail.com [216.40.44.27]) by kanga.kvack.org (Postfix) with ESMTP id 868036B0036 for ; Mon, 30 Nov 2020 16:01:32 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 498BC82499A8 for ; Mon, 30 Nov 2020 21:01:32 +0000 (UTC) X-FDA: 77542305624.07.unit52_1a053b5273a5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 21BA21803F911 for ; Mon, 30 Nov 2020 21:01:32 +0000 (UTC) X-HE-Tag: unit52_1a053b5273a5 X-Filterd-Recvd-Size: 3846 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Mon, 30 Nov 2020 21:01:31 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id y16so20252895ljk.1 for ; Mon, 30 Nov 2020 13:01:31 -0800 (PST) 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=MfBG/54OyTRJiWtpsok7Jr2j/N7jeyEBXeoHXE64Qs8=; b=OR7LHevBUwdO4js3xbw27kSJjJK7b7r2zrYg/+GicXe4c6K5tfvaKlgdOB3ni0ax1O 9FEUkoXJ/RCZgWPFClDOhgP+IIWJ9kRqYs6yML1ZC+oGdBNeHztsUbrWdOrq1zxYex/M e5831ufsaidd9Fc8KJOlIl5Dg8zYqrmHGsP5wYUhO+jmMMcjc2NTPRteTtbVrZn0y0yz b+F4qqgHCbo7HgT2620ZPLHu8YY2o3USpQlcbHb4Z8J2fRAjdEdMyuLh29wdugUs4aJ6 riPKAGHXxgxwXjJ7NEm9LJP0nsooNhJwUFNK9CIIsS2OqAekoZNOeJNg2g6rxvVYPnjp gpSA== 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=MfBG/54OyTRJiWtpsok7Jr2j/N7jeyEBXeoHXE64Qs8=; b=RBQwypPdMW6NzwVaD5q2RdvDHeQwqkbbg7/hoWxefWLhJHNgtQyPHsby2+uoRK7VWC 7+eyPPqtjvvQY2qwjEwrNIC6XRHiRP0ANvKLQ6FaGxpuMaA/D5hnexuGrWqOYBvgL0CZ 7QL2EsOv9oUMZZDf1VKelJjqyDR4lqpvOariXIX5xivlua8TXOqCOYT2kF2oRJW5BwR1 Kgk31xhZ/XsRaM6hnBxKdpHdhV9bvjKO06DQYN8q1j86RqKDa7+clJkKLs7LDidZbDa8 nkenxsgueH9QIMrMgzkBPA0CYU7tyMcpnbqAt06VAuXFq/2ES8lMP85qtHkier05ZpSG uQsw== X-Gm-Message-State: AOAM530S5jHas1WEkGkNukIgnc5+KkbAwr1zOFD1fwot9TNfPswze2yF I64PBySvd0dnjba+wy+2IpuMJPy85oIFQOAkjHLq9w== X-Google-Smtp-Source: ABdhPJwguSnAkPvJuN9LIzqSs78aXwru+P87EQ1/nNrKddX45uAAwZrmzE1LHPJw/qoITVIhzXN8Ht/crexEzqwH4e0= X-Received: by 2002:a2e:8745:: with SMTP id q5mr10752520ljj.347.1606770089903; Mon, 30 Nov 2020 13:01:29 -0800 (PST) MIME-Version: 1.0 References: <20201126005603.1293012-1-shakeelb@google.com> <20201130203425.GA1360286@carbon.DHCP.thefacebook.com> In-Reply-To: <20201130203425.GA1360286@carbon.DHCP.thefacebook.com> From: Shakeel Butt Date: Mon, 30 Nov 2020 13:01:18 -0800 Message-ID: Subject: Re: [PATCH 0/2] memcg: add pagetable comsumption to memory.stat To: Roman Gushchin Cc: Johannes Weiner , Michal Hocko , Andrew Morton , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 30, 2020 at 12:34 PM Roman Gushchin wrote: > > On Wed, Nov 25, 2020 at 04:56:01PM -0800, Shakeel Butt wrote: > > Many workloads consumes significant amount of memory in pagetables. This > > patch series exposes the pagetable comsumption for each memory cgroup. > > Hi Shakeel! > > The code looks good to me. However I'm not sure I understand what's the > use case for the new statistics? Can you, please, elaborate a bit more here? > > From a very first glance, the size of pagetables should be _roughly_ equal > to the size_of(pte)/PAGE_SIZE*(size of a cgroup) and should not exceed 1% > of the cgroup size. So for all but very large cgroups the value will be > in the noise of per-cpu counters. Perhaps I'm missing some important cases? > I think this is in general a good metric to have but one specific use-case we have is the user space network driver which mmaps the memory of the applications for zero copy data transfers. This driver can consume a large amount of memory in page tables. So, this metric becomes really useful here. Shakeel