linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	David Hildenbrand <david@redhat.com>,
	richard.weiyang@gmail.com,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: [PATCH v4] mm: fix accounting of memmap pages
Date: Fri, 8 Aug 2025 03:40:25 +0000	[thread overview]
Message-ID: <20250808034025.bh5giuozvz7ri34m@master> (raw)
In-Reply-To: <20250807183545.1424509-1-sumanthk@linux.ibm.com>

On Thu, Aug 07, 2025 at 08:35:45PM +0200, Sumanth Korikkar wrote:
>For !CONFIG_SPARSEMEM_VMEMMAP, memmap page accounting is currently done
>upfront in sparse_buffer_init(). However, sparse_buffer_alloc() may
>return NULL in failure scenario.
>
>Also, memmap pages may be allocated either from the memblock allocator
>during early boot or from the buddy allocator. When removed via
>arch_remove_memory(), accounting of memmap pages must reflect the
>original allocation source.
>
>To ensure correctness:
>* Account memmap pages after successful allocation in sparse_init_nid()
>  and section_activate().
>* Account memmap pages in section_deactivate() based on allocation
>  source.
>
>Cc: stable@vger.kernel.org
>Fixes: 15995a352474 ("mm: report per-page metadata information")
>Suggested-by: David Hildenbrand <david@redhat.com>
>Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>

LGTM

Reviewed-by: Wei Yang <richard.weiyang@gmail.com>

-- 
Wei Yang
Help you, Help me


  reply	other threads:[~2025-08-08  3:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07 18:35 Sumanth Korikkar
2025-08-08  3:40 ` Wei Yang [this message]
2025-08-08 14:23 ` David Hildenbrand
2025-08-21  4:51   ` Andrew Morton
2025-08-21 12:43   ` Sumanth Korikkar

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=20250808034025.bh5giuozvz7ri34m@master \
    --to=richard.weiyang@gmail.com \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=sumanthk@linux.ibm.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