From: Matthew Wilcox <willy@infradead.org>
To: Sourav Panda <souravpanda@google.com>
Cc: corbet@lwn.net, gregkh@linuxfoundation.org, 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, weixugc@google.com
Subject: Re: [PATCH v3 1/1] mm: report per-page metadata information
Date: Tue, 31 Oct 2023 20:26:42 +0000 [thread overview]
Message-ID: <ZUFjAj8Liaa/Ijmm@casper.infradead.org> (raw)
In-Reply-To: <20231031174459.459480-2-souravpanda@google.com>
On Tue, Oct 31, 2023 at 10:44:59AM -0700, Sourav Panda wrote:
> +++ b/mm/hugetlb.c
> @@ -1790,6 +1790,10 @@ static void __update_and_free_hugetlb_folio(struct hstate *h,
> destroy_compound_gigantic_folio(folio, huge_page_order(h));
> free_gigantic_folio(folio, huge_page_order(h));
> } else {
> +#ifndef CONFIG_SPARSEMEM_VMEMMAP
> + __mod_node_page_state(NODE_DATA(page_to_nid(&folio->page)),
> + NR_PAGE_METADATA, -huge_page_order(h));
> +#endif
surely,
__node_stat_sub_folio(folio, NR_PAGE_METADATA)
> @@ -2175,7 +2179,9 @@ static struct folio *alloc_buddy_hugetlb_folio(struct hstate *h,
> __count_vm_event(HTLB_BUDDY_PGALLOC_FAIL);
> return NULL;
> }
> -
> +#ifndef CONFIG_SPARSEMEM_VMEMMAP
> + __mod_node_page_state(NODE_DATA(nid), NR_PAGE_METADATA, huge_page_order(h));
__node_stat_add_folio(folio, NR_PAGE_METADATA)
(create the folio first ...)
> + __mod_node_page_state(NODE_DATA(page_to_nid(page)),
> + NR_PAGE_METADATA, 1);
Are you allergic to page_pgdat()?
> @@ -1656,6 +1657,8 @@ static void __init alloc_node_mem_map(struct pglist_data *pgdat)
> panic("Failed to allocate %ld bytes for node %d memory map\n",
> size, pgdat->node_id);
> pgdat->node_mem_map = map + offset;
> + mod_node_early_perpage_metadata(pgdat->node_id,
> + PAGE_ALIGN(size) >> PAGE_SHIFT);
I swear I said to use DIV_ROUND_UP(). Yes, I did:
https://lore.kernel.org/linux-mm/ZS%2Fm1KRwTLkcJY8y@casper.infradead.org/
Why have you done something different and claimed I said to do it?
You've annoyed me now; I shan't review the rest of this.
next prev parent reply other threads:[~2023-10-31 20:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 17:44 [PATCH v3 0/1] " Sourav Panda
2023-10-31 17:44 ` [PATCH v3 1/1] " Sourav Panda
2023-10-31 20:26 ` Matthew Wilcox [this message]
2023-10-31 22:38 ` Sourav Panda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZUFjAj8Liaa/Ijmm@casper.infradead.org \
--to=willy@infradead.org \
--cc=Liam.Howlett@oracle.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=chenlinxuan@uniontech.com \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=ivan@cloudflare.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=muchun.song@linux.dev \
--cc=pasha.tatashin@soleen.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rppt@kernel.org \
--cc=shakeelb@google.com \
--cc=souravpanda@google.com \
--cc=surenb@google.com \
--cc=tomas.mudrunka@gmail.com \
--cc=vbabka@suse.cz \
--cc=wangkefeng.wang@huawei.com \
--cc=weixugc@google.com \
--cc=yang.yang29@zte.com.cn \
--cc=yosryahmed@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox