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 1D81EC41513 for ; Thu, 19 Oct 2023 16:15:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9D8956B0181; Thu, 19 Oct 2023 12:15:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 95FD76B0192; Thu, 19 Oct 2023 12:15:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D9B76B01A9; Thu, 19 Oct 2023 12:15:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 69DA06B0181 for ; Thu, 19 Oct 2023 12:15:27 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 37F701A04B4 for ; Thu, 19 Oct 2023 16:15:27 +0000 (UTC) X-FDA: 81362711094.05.BBA248D Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by imf21.hostedemail.com (Postfix) with ESMTP id 426F11C001F for ; Thu, 19 Oct 2023 16:15:24 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=F3WKE0Zc; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf21.hostedemail.com: domain of souravpanda@google.com designates 209.85.218.46 as permitted sender) smtp.mailfrom=souravpanda@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697732124; 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=PnnHCgqdhifor6lfgtYl9ZfLm70vNGY4Q5xj9QTPiWU=; b=CdOWga+1prXtCBHqQfXeAAIODJWLRL0yzATRurNWc2n8tic2omogxxiFk90p+ITx8Jc1xZ aWpyf2kp//VMC5+2lI7Fuyp+k5jUucUQNdRHEhFxZzoovz42L5s/4Eb6LDMf006KKgFPFe Ck8Wco+OX2vZ84DkRv/14m0nTwBZOEs= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=F3WKE0Zc; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf21.hostedemail.com: domain of souravpanda@google.com designates 209.85.218.46 as permitted sender) smtp.mailfrom=souravpanda@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697732124; a=rsa-sha256; cv=none; b=1NGTKz6WGzuaC6v9tyfypu5PCqIPb/aAcYWxLFq7iNbm7yPsz4fW9i0EUW9CWr5SaafWQQ gnRUF6ZTCu2cliPbOBGgags5pJ6hInfeCi9Mrh6TYKJ+TNE/VlCbuh+UGb9F6MwkL2Flfw AYCeIGZ2CQqfrXlxlSkk71/LbFvC2f8= Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-99de884ad25so1312255566b.3 for ; Thu, 19 Oct 2023 09:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697732123; x=1698336923; 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=PnnHCgqdhifor6lfgtYl9ZfLm70vNGY4Q5xj9QTPiWU=; b=F3WKE0Zc2g0k0SIANIiFXHWV6xnD4IXt+BmRr2IuC6P/05fk6ie4oD07tOifel/Zmb w1WI6Z5Wtwm6lmiKJ/BzTXBEvxx9Ko3BddGEHz2JUL9H1hFGtpFR+xIbtmWaWY4Ouv3J 8qYtQdObgas+jTnbQT87S/suNih8nFqNU/IZk/59FP0xQdxH4lwTSexIARaaeT13Vc7G Ul1vDPL2/liH0otQoW5pCRU4zk49WLXmcicbW5zeDl05PbpMvoUnxbAkznSyggA935rb zfc1u9Ii4n+st3vj4EtecvdHQ6D8GMkZnbjAABCsGG64Cn/noO+QQ5OJceUOxCKNCpGv L/vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697732123; x=1698336923; 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=PnnHCgqdhifor6lfgtYl9ZfLm70vNGY4Q5xj9QTPiWU=; b=h+yEAOPW+gd9uC3JS1nnBLfyzyk0W8u/V6B3bh1hJeyv9Uqq7lXr7uUJiuF2dIJtCj DRiezTFnYfnFtwjihNGmlZ9OcmOc0srvX6a86oT5qHZqLTTwiWNDOwU1G0FKFJ4cHuNi zY6E3sZX9M92Hw/UFwOEBe+Ek254fkqJqcfRMc3a1VujMPUthUwdN/npRxims8yC4/aL OYtTXyyssd6QfT8lr7eD3TCIoWCasMTDvGGpnvtjcqbVibonA+R11n5VLmiz1Cja3VMT bkpR6nMMgUCg8g9ol27TbbKGQK1TC3cl2TDUVAFB+gsEtc6Fc0h3cGLEa5LA2mg4rGMX 3bRg== X-Gm-Message-State: AOJu0YyD+mWKrVOcmrftSiz1cggVAqd4akcmKmxdhXcvpdDO0O8syiA2 nZ/PcrO0C4TlmlQ0ZR97rV4BSXOuKxRUrZL828C62g== X-Google-Smtp-Source: AGHT+IFDmtE6eprWxPSKsbGHa8gZS4PrcZ67eHXAXXzQokbRw+nCXKjF7qYBGqQVhUkdaZhwHa8IKzvc28FDeAZdCQ0= X-Received: by 2002:a17:907:1b11:b0:9be:8693:66bb with SMTP id mp17-20020a1709071b1100b009be869366bbmr2305176ejc.59.1697732122767; Thu, 19 Oct 2023 09:15:22 -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:15:10 -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="0000000000001adfea060814101b" X-Rspamd-Queue-Id: 426F11C001F X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: aq999ybzgim7kbxqmi8siq785ts6obdi X-HE-Tag: 1697732124-852266 X-HE-Meta: U2FsdGVkX1852hvenplsCmlmv3n+7ANphI39xjQHZDhkKMZhUiXR6AHCgQXFW9XxPopxDcXENEncGDcinhg1Ex1n/Lx02N29KktYWa2FFu+6DS/scX8R19S0YkVLlmwzXpFLQ5gRHW0EvP9q9QWEdoJQ0QzH0suVIX+ybkNrxs9cO7r4PAvVfsVnfj4XU/A2Nuqlr25GZh/Rv4crmxvxIS1hooVjbbzO4ENza934UxCizbZOguEoxujfdOZwcKgnYCNciWBHX8iJ/CvfRvATocbBjkiFfvgsN43GOd/dviMMSfL6prss8s/L32D1YRx6AJqAT8TOoE0SdVVwRlGOB2pKwZs7ys+Q6hYntcnYd2XMEW2sD322K/0bx/C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Hj+Cg5y0MC6wHJHJdmjo/vmGrLTZGU8hh2a8jGAi95jOU2fi7aa7rFEJGSAuzm1ct3n8YxexmEYZarzRVYyvcZytrfNAdpMFhmBE4Pnf/7bLhbN1ZpJzon1KyALEZ8ifrO X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --0000000000001adfea060814101b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 > --0000000000001adfea060814101b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Greg,

Thank you very much for reviewing my patch= . I removed the other style errors pointed by=C2=A0checkpatch.pl=C2=A0but m= issed this one. My bad! I will fix it in version 3.

= With regards,
Sourav Panda

On Wed, Oct 18, 2023 at 12:52=E2= =80=AFAM Greg KH <gregkh@l= inuxfoundation.org> wrote:
On Tue, Oct 17, 2023 at 05:55:48PM -0700, Sourav Panda wr= ote:
> 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
--0000000000001adfea060814101b--