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=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham 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 8480EC63777 for ; Mon, 30 Nov 2020 21:13:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EC2C6206A5 for ; Mon, 30 Nov 2020 21:13:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="XKUoVsy0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC2C6206A5 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 428E46B0036; Mon, 30 Nov 2020 16:13:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D95A8D0002; Mon, 30 Nov 2020 16:13:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C6B58D0001; Mon, 30 Nov 2020 16:13:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 141FC6B0036 for ; Mon, 30 Nov 2020 16:13:20 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id CF0D4181AC9B6 for ; Mon, 30 Nov 2020 21:13:19 +0000 (UTC) X-FDA: 77542335318.18.duck25_2b020ea273a5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 80F0F100ED0FE for ; Mon, 30 Nov 2020 21:13:19 +0000 (UTC) X-HE-Tag: duck25_2b020ea273a5 X-Filterd-Recvd-Size: 4407 Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Mon, 30 Nov 2020 21:13:18 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id 142so20236956ljj.10 for ; Mon, 30 Nov 2020 13:13:18 -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=n3KWtTbyu910cgBxnHje89Hi5Pdj67SfhYeBysSLt7k=; b=XKUoVsy05kCrVvddDePtP1hpa3frBZCDGjBpVl7lJPZTEaWp141MdeEkgWFXE2hMtZ Jg80YRM8bwYP283gjRBtADdNaKGlvkz/bJu5fQm/Ckd7P+G5/SbnNroKAddGj1XgbO3v PmRGS6aWjrAm44AlOHzhtyU+0r7PM3uciizC0Kq0ccOPUEqEqTFHvW/2BWQe/ceFeaS0 IHC+QLIsEs+SbquUOpbBHRlotQCu62+8vY6/MwuByvi2FhnrITWx+tJftLqlJH7ZJmKH 7Q8/QfqkKtI3fe5mJrlzsMGz2THKrM5iGkIAdTfeZ1ToA9oF4x+0TafKFFJ3JdZjCBq0 E1bg== 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=n3KWtTbyu910cgBxnHje89Hi5Pdj67SfhYeBysSLt7k=; b=Ij+GZO1KL6jIiWlDVR9vxj0HIuzwqdGaRyBJ2AUuEKuMGGPqSrQgkyv1UsMXa+8IVl 6rkXitnPlI7MEWw22+cdyqIkqQObHP5AHSGaADXTIhKjiQOYMBqJQ2IY97e2wj6KyKVd RF0/yZJA6DUTYQj02QhcRrB+PAjebXieZY4l9U3zwt4kUeMhIeaazOsDCqQq36472umb H9l82cS7rZCRlaSucmyO/Um7pLikZ5CekpwcD0azfEH9CUAt6emAOZ6SRP2sdInfdCKW LpaPY67M67Fj6DyVpR5pHDksCGuery8GXicCKskdfsjAfeuSTUSY6bnIEqbg229OwYhj U5ZQ== X-Gm-Message-State: AOAM531AycNE+j0q5EYnzhOe8JCVnTgvQITrKuFNMoV4giihw+Qmi0Yf H+w1zoY4R+YcvOQkwza1FfaiG47wHwpO/70KwVKA0vJQllg= X-Google-Smtp-Source: ABdhPJxPhOUEdXtkkQNUJiSzYLzLvwVafq/DEqFzMlodHcjTU8K1Kz2KqSKdPFiog2fz99yGTWDMpFJ1kGKHxWe+NY8= X-Received: by 2002:a2e:b16a:: with SMTP id a10mr11561573ljm.446.1606770797208; Mon, 30 Nov 2020 13:13:17 -0800 (PST) MIME-Version: 1.0 References: <20201126005603.1293012-1-shakeelb@google.com> <20201130203425.GA1360286@carbon.DHCP.thefacebook.com> <20201130211050.GB1360286@carbon.DHCP.thefacebook.com> In-Reply-To: <20201130211050.GB1360286@carbon.DHCP.thefacebook.com> From: Shakeel Butt Date: Mon, 30 Nov 2020 13:13:06 -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 1:10 PM Roman Gushchin wrote: > > On Mon, Nov 30, 2020 at 01:01:18PM -0800, Shakeel Butt wrote: > > 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. > > Got it, thank you for the explanation! > Would you mind to add this text to the cover letter as an example? Sure. > > Acked-by: Roman Gushchin > for the series. Thanks for the review.