Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp209898imm; Tue, 7 Aug 2018 17:14:07 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyUcuFtMET7K+//QDfRbtN45Ztr3cOQ7nS/lzZe84wwkCi0WAtfjNgpHSy2J4aFGkLSc3gp X-Received: by 2002:a63:614d:: with SMTP id v74-v6mr423971pgb.328.1533687247311; Tue, 07 Aug 2018 17:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533687247; cv=none; d=google.com; s=arc-20160816; b=QEUx2BakPtGIwEcAU6DKPvEgNNQIB6/2K4ERc4b7uXnyyMj3+3LjiIKe//gA2yON+5 wvmBTOJGCDQSD3h7U3BX3LhUi/SJC44pMnBwBovl7mTI9rRn1O7qhQ2Bzm7QQIkejXHN nzSnDvFXLAOejejxKwTgortRYRANFiJNoHjaEIVnsUoSWoHzB7TCZzVymrOxFrDifFRX aHbwRy6UNYkxYn9YNTlfkFbZ1J3OOaX943bxjOiKNPjYBfMNDT3SCzBmoi3LLzu+u/+S ogp4nlv89cAfVuMWXbt4x8c941LyIqGBirQ+GFEuFlkkBxMdj0pmiibB1Go52OW84idC HC3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=dWyiKeJP09EBuoXptEr6ZWLui8tsXxPnjRQ5HLbTHWc=; b=wwCPwsQWSHW2pP7FbWWDen6/hC+9LCYXVcIXmX5OJaytyKi8yQty1OShfiS/dAzhd1 IrkiTFbEjScfd9OtQINKrOzqryyMsEvJvZ9fbUaJEmLiTrbte9J8alKZaaBzNvZl0h2t fgH8ZrQrWmCOHx8C0TEm49GVLdQaYmisSsXHKwlw87HKn6bQYL6Yd6Ba0AY3lQzE8Hti HCyRksq6lLs7JAOmmJ8w6Bur7ad2AUOFBu+IMcokpFIRIb34BJgQ5VQgiPK83bs0aDeK MGAJvCpxOcQJyEUHVYOMFUgXoornpIYSjAYE+gDC5lUV9zQG75bT46B1v2f2H//g4lOU V3NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=juVwbzkz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18-v6si2899480pfk.78.2018.08.07.17.13.52; Tue, 07 Aug 2018 17:14:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=juVwbzkz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726697AbeHHC34 (ORCPT + 99 others); Tue, 7 Aug 2018 22:29:56 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:37465 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726113AbeHHC34 (ORCPT ); Tue, 7 Aug 2018 22:29:56 -0400 Received: by mail-pg1-f196.google.com with SMTP id n7-v6so204573pgq.4 for ; Tue, 07 Aug 2018 17:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=dWyiKeJP09EBuoXptEr6ZWLui8tsXxPnjRQ5HLbTHWc=; b=juVwbzkzNUC7lT7rCZRdy7YUM97OOH3hf+bUlzuc2nVux81GwIqUjwOP13bIBAhcjC zM4PnnyMmeEjm0O+HYoVAODVcyO3/l+3WiAOeE0l0EGnWxNNiW8OHRSsmaiJbJrmA5sj NNO2beTTaKglQSgpUi3wViJ3lP66PVckKbSauh3GSJXUa/LMSGpXmnI9ukwpu5RcWXAH 72GC+A3JV9jRD4WDFeE5CFkrhduKsayQXu6l0k1DE1kVpPcEt4of4RbOG79F8p+zWS8q C1THbir2+3xjW22hqq+Md4lmnUV0XpE4JOMoAFXhDJi4E5WgyJQOMyc/xML/vYUShBrr lnaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=dWyiKeJP09EBuoXptEr6ZWLui8tsXxPnjRQ5HLbTHWc=; b=H0wG8aoNCclY3CG3dNtqWurbMsxyDbuuF/gagd2oiDYQWTWdISE1QuNOYNJEVKiPtu Ho68OWUKhFU0v/d92IgJgreEmj3K0BG6IcOUb6zyPVt61GPsElG6DEOno317I/VOemA2 aTJuxObDLPkB4FVj1ZWjLmCRMdeQaZwX+6Mdi/Hmx020JxdqtBVex4SZpi3x9178IDTT PVROe/9ZHkqS4Jjxe3ANLLovE8cjSu1PqS22jcyCHEhARc2thqd8dpek7mJaxRVRkR36 OL3o11vMPLHXg/XHGqsXCfuppQDfqNuY4lh3OvHC0CNuWCRssulrW/XaTs7bbk8KAP2A hXjw== X-Gm-Message-State: AOUpUlHEiaHDMUYmpC0uZKjDhb4KE7iOApZNYm1Y8e0wGCf3iUEiEfGa 0phbpksy+4ZGZgYXuMtsskjrWw== X-Received: by 2002:a65:5803:: with SMTP id g3-v6mr424900pgr.117.1533687181565; Tue, 07 Aug 2018 17:13:01 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id z184-v6sm3536899pgd.83.2018.08.07.17.13.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Aug 2018 17:13:00 -0700 (PDT) Date: Tue, 7 Aug 2018 17:12:59 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Dennis Zhou cc: Andrew Morton , Tejun Heo , Johannes Weiner , Christoph Lameter , Roman Gushchin , Vlastimil Babka , kernel-team@fb.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Linux API Subject: Re: [PATCH v2] proc: add percpu populated pages count to meminfo In-Reply-To: <20180807184723.74919-1-dennisszhou@gmail.com> Message-ID: References: <20180807184723.74919-1-dennisszhou@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Aug 2018, Dennis Zhou wrote: > From: "Dennis Zhou (Facebook)" > > Currently, percpu memory only exposes allocation and utilization > information via debugfs. This more or less is only really useful for > understanding the fragmentation and allocation information at a > per-chunk level with a few global counters. This is also gated behind a > config. BPF and cgroup, for example, have seen an increase use causing > increased use of percpu memory. Let's make it easier for someone to > identify how much memory is being used. > > This patch adds the "Percpu" stat to meminfo to more easily look up how > much percpu memory is in use. This number includes the cost for all > allocated backing pages and not just isnight at the a unit, per chunk > level. Metadata is excluded. I think excluding metadata is fair because > the backing memory scales with the numbere of cpus and can quickly > outweigh the metadata. It also makes this calculation light. > > Signed-off-by: Dennis Zhou Acked-by: David Rientjes