Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4860041imm; Tue, 7 Aug 2018 08:31:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe2pl37K4l4Qx9U4MU5OB3y6JePWzbrBs/vcM5oO8iDXKI3QuCkhcLjRNaOIEv8hALcPH53 X-Received: by 2002:a63:c60:: with SMTP id 32-v6mr19334221pgm.155.1533655871679; Tue, 07 Aug 2018 08:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533655871; cv=none; d=google.com; s=arc-20160816; b=LSUbEh+IxN7PNi417XA17DW35joLLfsOlpdwWwM4WajlVh4553wdknY2aJp5FAGcvi erPqyW4eROC2P2RhCXHhUT5CIfIaziddwErFpyVm6jex83jP7V1U57H+ak4IMH2aOjpD NEMQvWzT5FR2znQy7WJYyGqkhTR9VGktaE/4KZ0KP09O7Z4Mbnr0teTqIpug2Srr/nCI xdCqpTaK19AbhT9Cdwiqi4MH9ZWz3XWjDPEmYToAivDU6Z1cfs2ySt8h8nmYnBYEwy8L w6clP5nfnRjRY3XiGBladgZ9+rcaps0bjwMX6tgYA9uJKabIKI7YshgbHZGc6Cyedom5 Rx6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=AG4d9RCNRhFUim9zT37k9NhslmM06huXwGxSG9yK4Ko=; b=A6IPvClhP9oyI5vrzrIRNpf9uTMGlPVVfO5kr7fMNLK46tv95BtHmZXZpstoPKI8Y6 VuqYq2nqhiETB82S7wC014jFwOWhh+AUuMOnPkkAnwkr0su8hbhWBthrwiwD2CUFLgMU EbEMxm7lMX5cC3YuXQyn9fqN1nIB/fuTf/Kdtlyez86vTJVbxaYGxROAq7Xrev4KX8kF h2ubH6VbGdVbwNfMCHQscRzoY2SIA4wy0q20gAYr/r6ugQ3f5A0beOQXRbCdQRaxeJOJ sRMYH1xpzIci9RMqL3LSGyDuMfrZx67oQE/1P1JsrF7E1lgraPtcnSjPIe0l0XS+ZJd4 UnUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="d5/bLWxg"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k188-v6si1497205pgc.321.2018.08.07.08.30.56; Tue, 07 Aug 2018 08:31:11 -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=@gmail.com header.s=20161025 header.b="d5/bLWxg"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389913AbeHGRgC (ORCPT + 99 others); Tue, 7 Aug 2018 13:36:02 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42700 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387632AbeHGRgB (ORCPT ); Tue, 7 Aug 2018 13:36:01 -0400 Received: by mail-pf1-f193.google.com with SMTP id l9-v6so8738197pff.9 for ; Tue, 07 Aug 2018 08:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AG4d9RCNRhFUim9zT37k9NhslmM06huXwGxSG9yK4Ko=; b=d5/bLWxgN0JjlDv3OgUQezQOYHzi0CbmCWZV1USY3AzBusQ+IfkP5EI9YSGx1hKXxw HZ8eD0W35UetUdmd2RlMcD3P+FppsbPuPiuvPcPt5eN9KzdMp1wHSPalfgyKgoXj/7ck CDarUNFFzIkU3WmG33D+CkAMtG1DwQ+dv0X3oQnv1WDmPrxGqtj8Z8uU5jrM3ZV5cUPa thn6ED2ga0+d5qTNpXBGD1lcyRVlKD7kFOEnlrNLbzqOdQEUzwb2Yj+Lf2iUeor7FE3a n25ieGMV9ncXUh99EswGY+WHe2akOH5avR+mTuUCfvC9RgQ4w0frWEy66cw39qmpMo8+ qVuA== 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:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AG4d9RCNRhFUim9zT37k9NhslmM06huXwGxSG9yK4Ko=; b=dPXZ+rfs2IacdJw9dcax3nilOuuk2/zdl4U5vyGnyvyayjTzVbcK7WZdwoLecHh43I D8YGZiNjBznYwK81uxoMp8lRLh29uO5Kheqes610cHmAUFMCrPn3C/wYeoiVfQ6cxR1M C8bs3urmR/dtDiHqHmGWVKGjasZfNCgS38Ulhk3mVbKtF4fsgAUkBYro1ku2/+ASg08n a22BfeqogpJ0iIH1xBVXKMAPKDuvydVMPzvKWGfgrnmRWSxf8NSJzHhLmVNNo8QOzLQL y9qfz2f6c7AK9uuRWU94n+xOQ8TKhmLnGJxSsesI1MH7RguHj6Pb+dSBvfiWAajedcPI fHqA== X-Gm-Message-State: AOUpUlFmwwlpmZjxB2E6eGtx0FRXhaIn4tsESMin/rgK9s0drlC3JTa6 8N84d6zCxOLNPKoeBsBFz5k= X-Received: by 2002:a63:e206:: with SMTP id q6-v6mr19113896pgh.223.1533655273080; Tue, 07 Aug 2018 08:21:13 -0700 (PDT) Received: from dennisz-mbp.dhcp.thefacebook.com ([2620:10d:c090:180::1:e25]) by smtp.gmail.com with ESMTPSA id s14-v6sm5443688pfj.105.2018.08.07.08.21.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Aug 2018 08:21:12 -0700 (PDT) Date: Tue, 7 Aug 2018 08:21:09 -0700 From: Dennis Zhou To: Christopher Lameter Cc: Andrew Morton , Tejun Heo , Johannes Weiner , Roman Gushchin , kernel-team@fb.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] proc: add percpu populated pages count to meminfo Message-ID: <20180807152107.GB59704@dennisz-mbp.dhcp.thefacebook.com> References: <20180807005607.53950-1-dennisszhou@gmail.com> <0100016514bb069d-a6532c9a-b1ca-4eba-8644-c5b3935e3bd8-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0100016514bb069d-a6532c9a-b1ca-4eba-8644-c5b3935e3bd8-000000@email.amazonses.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christopher, On Tue, Aug 07, 2018 at 02:12:06PM +0000, Christopher Lameter wrote: > On Mon, 6 Aug 2018, Dennis Zhou wrote: > > show_val_kb(m, "VmallocUsed: ", 0ul); > > show_val_kb(m, "VmallocChunk: ", 0ul); > > + show_val_kb(m, "PercpuPopulated:", pcpu_nr_populated_pages()); > > Populated? Can we avoid this for simplicities sake: "Percpu"? Yeah, I've dropped populated. > > We do not count pages that are not present elsewhere either and those > counters do not have "populated" in them. I see, that makes sense. I think I was trying to keep an external distinction between what we reserve and what we actually have populated that really isn't useful outside of playing with the allocator itself. > > int pcpu_nr_empty_pop_pages; > > > > +/* > > + * The number of populated pages in use by the allocator, protected by > > + * pcpu_lock. This number is kept per a unit per chunk (i.e. when a page gets > > + * allocated/deallocated, it is allocated/deallocated in all units of a chunk > > + * and increments/decrements this count by 1). > > + */ > > +static int pcpu_nr_populated; > > pcpu_nr_pages? > I'd rather keep it as pcpu_nr_populated because internally in pcpu_chunk we maintain nr_pages and nr_populated. That way we keep the same meaning at the chunk and global level. Thanks, Dennis