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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB045CDB465 for ; Thu, 19 Oct 2023 16:22:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 48260800A0; Thu, 19 Oct 2023 12:22:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 40D1280090; Thu, 19 Oct 2023 12:22:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2867C800A0; Thu, 19 Oct 2023 12:22:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1621480090 for ; Thu, 19 Oct 2023 12:22:34 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id E0D07B50BC for ; Thu, 19 Oct 2023 16:22:33 +0000 (UTC) X-FDA: 81362728986.27.546ED28 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by imf20.hostedemail.com (Postfix) with ESMTP id 183CC1C000F for ; Thu, 19 Oct 2023 16:22:31 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=iVOpvEiw; spf=pass (imf20.hostedemail.com: domain of souravpanda@google.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=souravpanda@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697732552; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=59ya1KtbcxtT1vkcSefmBzXGuQaulxyfSAjP3VpTh2E=; b=H1F7XI/B3OGGj3GfZEV4UBpMoVCfqm6ya+AlLBtoDKOkHqAsLEXH7DunMPRYzU8Zf1E6gm licSjaSiCuqxFR5fJ5LD49vvAFgp1Oqnp32OzY2eOFHgWse+IWDUxaJjWygXJiUBs8Xhmu ev8OvMz8oRzv44oZrHtKmHL6LuWJrAE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697732552; a=rsa-sha256; cv=none; b=znxgTsj5HE/LAKZzzRcQvw9+EkTZ+G/Uc/HfUYqT48gSvTPTu7XIALWInJ/v13woWBN1f+ GLcBB3RBlXlrWgKM1uizSuevWdvRyl/bpoLPbjpTZ6JJsO0dqnP+2/EWIov6SdveGzZulL +e3rVXOVbycDLU58X3ddEIhArxoF3Oc= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=iVOpvEiw; spf=pass (imf20.hostedemail.com: domain of souravpanda@google.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=souravpanda@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-53e3e7e478bso10911867a12.0 for ; Thu, 19 Oct 2023 09:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697732551; x=1698337351; darn=kvack.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=59ya1KtbcxtT1vkcSefmBzXGuQaulxyfSAjP3VpTh2E=; b=iVOpvEiwAzc8ezmiVivyVhJa8i0uKl/HJa1YOG603hYYpfDVVsINoSq70F1o08f16p 99z0HFHsSivQ2UVGVpqqyYc8awx64x0HX9+WhIrU52wENucVW0IpGMfzqiyUqFCisGwz PNwol3ZFPwpUKOGQHwRE5IJhUTXGTNwKsj73nqa6zFa7mVznqh9/ffesJ2EsV6kUXp5W 8mB92rValQRQn5K/Mfsn8ywjs4yWVvEUH97tlQ0ILLmb1knx1XLIeh9S+CvN3Hg9XYQV c4/tHmcpd73YbEdWtKiEzZy2CYOmEgwh2sC/PFCmqaWoZCZWKZWoI8o1QtHEANqiuQlU 9CpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697732551; x=1698337351; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=59ya1KtbcxtT1vkcSefmBzXGuQaulxyfSAjP3VpTh2E=; b=KRGHWKDWxJfoFNAfd/voUEbqRMyQXod/UhcE/EaixSlJHtuuS7B3QCGqeLGJcOXvQw Tj5jKTi0+cdabYEPNV41d6euxPlk0Q/mTs69/meVOShUfcb3SQivLFUZ7mwwW68+s+4h nwRA+PSVTmz+zGJpbiUp1lwnjrZg3OTpUJL2UL0VCx0b80k+gUysLA3zDBZbSEvDtofg KkoYItis++CJ0JZrLqaZN0YitXXjBNX6wmN07+S7WZv+eTz+TCraNyfNb3ZfFp2rgi1/ 7qYvyKeAhlNkKNA38ZznCAw+rUu1vjaewNRNcRkzMiM/hUHKlJGBSS4CWUAEiYq1zi1w vOng== X-Gm-Message-State: AOJu0YxBhJQT756weYoyeSgyIBmSgfaMQS8+A9I8KAsKSTCZzm+qigEu rEw5KS0GCl+k1k8csORWMrn+QVfTxpR7Dw348Uj+ag== X-Google-Smtp-Source: AGHT+IFhO9OrWIELJg3dG5sPrLh/qTk7375tucuW/iu8TkarNlgXLPTIAEf3r3SqaqynG8ijYdgAVwLCnK3DG36+WEI= X-Received: by 2002:a17:907:983:b0:9bf:2d82:53b9 with SMTP id bf3-20020a170907098300b009bf2d8253b9mr2022518ejc.59.1697732550474; Thu, 19 Oct 2023 09:22:30 -0700 (PDT) MIME-Version: 1.0 References: <20231018005548.3505662-1-souravpanda@google.com> <20231018005548.3505662-2-souravpanda@google.com> <2023101824-ventricle-hacked-6450@gregkh> In-Reply-To: <2023101824-ventricle-hacked-6450@gregkh> From: Sourav Panda Date: Thu, 19 Oct 2023 09:22:18 -0700 Message-ID: Subject: Re: [PATCH v2 1/1] mm: report per-page metadata information To: Greg KH Cc: corbet@lwn.net, rafael@kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com, muchun.song@linux.dev, rppt@kernel.org, david@redhat.com, rdunlap@infradead.org, chenlinxuan@uniontech.com, yang.yang29@zte.com.cn, tomas.mudrunka@gmail.com, bhelgaas@google.com, ivan@cloudflare.com, pasha.tatashin@soleen.com, yosryahmed@google.com, hannes@cmpxchg.org, shakeelb@google.com, kirill.shutemov@linux.intel.com, wangkefeng.wang@huawei.com, adobriyan@gmail.com, vbabka@suse.cz, Liam.Howlett@oracle.com, surenb@google.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org Content-Type: multipart/alternative; boundary="000000000000992d900608142924" X-Stat-Signature: 6m3dib4rxpkoq1t7emo1mauen97ay9up X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 183CC1C000F X-Rspam-User: X-HE-Tag: 1697732551-348392 X-HE-Meta: U2FsdGVkX1/JiaIV0DDWsgDcH+bBD6ZlOS3HIMiEKV1ZRUXbrqvxfr6LMnZFcizmBAKsPBBTR5V1Knjmi3Vs+uYoTzqnva78FomqJVaORwasqG8yzicD1IST5idNypwY+dJX0wccykhJhHwL0oLsQgYwfxJNig5rxkaync93oqCLbaZWy+hQjvyVkuUgC15/R2Ashrqn3YbDpPDoGEUy9o4X7JaB1ERMISr0tJa5F55Q71lUnogcKh4bUNiiO0PUIyw2PQCpjv81oCBLCUuhFbxHlSNCKYfZhQT7x7a57mAO/VVyEdbuvUhERo/ai2/mdWwr9zjRP4o3kak6jnBOwvWlErrYzAKniVJQ2RmqgXdu5AtHlkNr/Iem4whLUIDoAjinIFh1Ok5a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Wx3umFemLbsRVeDIm1Dehds6fnqPt/eFkDLJ512XUO1TJFhzX9wyhFYRGowHqRiBAAoR0277LHKvlKbGn41gubz6zQmv2Fe4lGJLDyusOaQixgYpPFP6Qi 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: --000000000000992d900608142924 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Oct 18, 2023 at 12:52=E2=80=AFAM Greg KH wrote: > On Tue, Oct 17, 2023 at 05:55:48PM -0700, Sourav Panda wrote: > > Adds a new per-node PageMetadata field to > > /sys/devices/system/node/nodeN/meminfo > > and a global PageMetadata field to /proc/meminfo. This information can > > be used by users to see how much memory is being used by per-page > > metadata, which can vary depending on build configuration, machine > > architecture, and system use. > > > > Per-page metadata is the amount of memory that Linux needs in order to > > manage memory at the page granularity. The majority of such memory is > > used by "struct page" and "page_ext" data structures. In contrast to > > most other memory consumption statistics, per-page metadata might not > > be included in MemTotal. For example, MemTotal does not include membloc= k > > allocations but includes buddy allocations. While on the other hand, > > per-page metadata would include both memblock and buddy allocations. > > > > This memory depends on build configurations, machine architectures, and > > the way system is used: > > > > Build configuration may include extra fields into "struct page", > > and enable / disable "page_ext" > > Machine architecture defines base page sizes. For example 4K x86, > > 8K SPARC, 64K ARM64 (optionally), etc. The per-page metadata > > overhead is smaller on machines with larger page sizes. > > System use can change per-page overhead by using vmemmap > > optimizations with hugetlb pages, and emulated pmem devdax pages. > > Also, boot parameters can determine whether page_ext is needed > > to be allocated. This memory can be part of MemTotal or be outside > > MemTotal depending on whether the memory was hot-plugged, booted with, > > or hugetlb memory was returned back to the system. > > > > Suggested-by: Pasha Tatashin > > Signed-off-by: Sourav Panda > > Change-Id: I4351791c9f4c1e9759cbd8e646e808565dbb595f > > checkpatch.pl should have said that "Change-Id:" should be removed, why > didn't you run this on your patch before submitting it? > > thanks, > > greg k-h > Hi Greg, Thank you very much for reviewing my patch. I removed the other style errors pointed by checkpatch.pl but missed this one. My bad! I will fix it in version 3. With regards, Sourav Panda --000000000000992d900608142924 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Oct 18, 2023 at 12:52=E2=80= =AFAM Greg KH <gregkh@linu= xfoundation.org> wrote:
On Tue, Oct 17, 2023 at 05:55:48PM -0700, Sourav Panda wrote= :
> Adds a new per-node PageMetadata field to
> /sys/devices/system/node/nodeN/meminfo
> and a global PageMetadata field to /proc/meminfo. This information can=
> be used by users to see how much memory is being used by per-page
> metadata, which can vary depending on build configuration, machine
> architecture, and system use.
>
> Per-page metadata is the amount of memory that Linux needs in order to=
> manage memory at the page granularity. The majority of such memory is<= br> > used by "struct page" and "page_ext" data structur= es. In contrast to
> most other memory consumption statistics, per-page metadata might not<= br> > be included in MemTotal. For example, MemTotal does not include memblo= ck
> allocations but includes buddy allocations. While on the other hand, > per-page metadata would include both memblock and buddy allocations. >
> This memory depends on build configurations, machine architectures, an= d
> the way system is used:
>
> Build configuration may include extra fields into "struct page&qu= ot;,
> and enable / disable "page_ext"
> Machine architecture defines base page sizes. For example 4K x86,
> 8K SPARC, 64K ARM64 (optionally), etc. The per-page metadata
> overhead is smaller on machines with larger page sizes.
> System use can change per-page overhead by using vmemmap
> optimizations with hugetlb pages, and emulated pmem devdax pages.
> Also, boot parameters can determine whether page_ext is needed
> to be allocated. This memory can be part of MemTotal or be outside
> MemTotal depending on whether the memory was hot-plugged, booted with,=
> or hugetlb memory was returned back to the system.
>
> Suggested-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> Signed-off-by: Sourav Panda <souravpanda@google.com>
> Change-Id: I4351791c9f4c1e9759cbd8e646e808565dbb595f

check= patch.pl should have said that "Change-Id:" should be removed= , why
didn't you run this on your patch before submitting it?

thanks,

greg k-h

Hi Greg,

Thank you very much= for reviewing my patch. I removed the other style errors pointed by=C2=A0<= a href=3D"http://checkpatch.pl/" rel=3D"noreferrer" target=3D"_blank">check= patch.pl=C2=A0but missed this one. My bad! I will fix it in version 3.<= br>

With regards,
Sourav Panda=C2=A0
--000000000000992d900608142924--