public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Pasha Tatashin <pasha.tatashin@soleen.com>,
	agordeev@linux.ibm.com, akpm@linux-foundation.org,
	alexghiti@rivosinc.com, aou@eecs.berkeley.edu, ardb@kernel.org,
	arnd@arndb.de, bhe@redhat.com, bjorn@rivosinc.com,
	borntraeger@linux.ibm.com, bp@alien8.de, catalin.marinas@arm.com,
	chenhuacai@kernel.org, chenjiahao16@huawei.com,
	christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com,
	dawei.li@shingroup.cn, gerald.schaefer@linux.ibm.com,
	gor@linux.ibm.com, hca@linux.ibm.com, hpa@zytor.com,
	kent.overstreet@linux.dev, kernel@xen0n.name,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, loongarch@lists.linux.dev,
	luto@kernel.org, maobibo@loongson.cn, mark.rutland@arm.com,
	mcgrof@kernel.org, mingo@redhat.com, mpe@ellerman.id.au,
	muchun.song@linux.dev, namcao@linutronix.de, naveen@kernel.org,
	npiggin@gmail.com, osalvador@suse.de, palmer@dabbelt.com,
	paul.walmsley@sifive.com, peterz@infradead.org,
	philmd@linaro.org, rdunlap@infradead.org, rientjes@google.com,
	rppt@kernel.org, ryan.roberts@arm.com, souravpanda@google.com,
	svens@linux.ibm.com, tglx@linutronix.de, tzimmermann@suse.de,
	will@kernel.org, x86@kernel.org
Subject: Re: [PATCH 2/2] mm: keep nid around during hot-remove
Date: Wed, 7 Aug 2024 13:50:00 +0200	[thread overview]
Message-ID: <e780e9af-e23d-44ff-ae0f-a8f4ee098a1c@redhat.com> (raw)
In-Reply-To: <345ba221-e094-47e8-9481-562faf4acd85@redhat.com>

On 07.08.24 13:32, David Hildenbrand wrote:
> On 07.08.24 00:14, Pasha Tatashin wrote:
>> nid is needed during memory hot-remove in order to account the
>> information about the memmap overhead that is being removed.
>>
>> In addition, we cannot use page_pgdat(pfn_to_page(pfn)) during
>> hotremove after remove_pfn_range_from_zone().
>>
>> We also cannot determine nid from walking through memblocks after
>> remove_memory_block_devices() is called.
>>
>> Therefore, pass nid down from the beginning of hotremove to where
>> it is used for the accounting purposes.
> 
> I was happy to finally remove that nid parameter for good in:
> 
> commit 65a2aa5f482ed0c1b5afb9e6b0b9e0b16bb8b616
> Author: David Hildenbrand <david@redhat.com>
> Date:   Tue Sep 7 19:55:04 2021 -0700
> 
>       mm/memory_hotplug: remove nid parameter from arch_remove_memory()
> 
> To ask the real question: Do we really need this counter per-nid at all?
> 
> Seems to over-complicate things.

Case in point: I think the handling is wrong?

Just because some memory belongs to a nid doesn't mean that the vmemmap 
was allocated from that nid?

Wouldn't we want to look at the actual nid the vmemmap page belongs to 
that we are removing?

-- 
Cheers,

David / dhildenb


  reply	other threads:[~2024-08-07 11:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 22:14 [PATCH 1/2] mm: update the memmap stat before page is freed Pasha Tatashin
2024-08-06 22:14 ` [PATCH 2/2] mm: keep nid around during hot-remove Pasha Tatashin
2024-08-07 11:32   ` David Hildenbrand
2024-08-07 11:50     ` David Hildenbrand [this message]
2024-08-07 14:40       ` Pasha Tatashin
2024-08-07 15:23         ` David Hildenbrand
2024-08-07 11:24 ` [PATCH 1/2] mm: update the memmap stat before page is freed David Hildenbrand

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=e780e9af-e23d-44ff-ae0f-a8f4ee098a1c@redhat.com \
    --to=david@redhat.com \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexghiti@rivosinc.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhe@redhat.com \
    --cc=bjorn@rivosinc.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=chenjiahao16@huawei.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dave.hansen@linux.intel.com \
    --cc=dawei.li@shingroup.cn \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=kent.overstreet@linux.dev \
    --cc=kernel@xen0n.name \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loongarch@lists.linux.dev \
    --cc=luto@kernel.org \
    --cc=maobibo@loongson.cn \
    --cc=mark.rutland@arm.com \
    --cc=mcgrof@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=muchun.song@linux.dev \
    --cc=namcao@linutronix.de \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=osalvador@suse.de \
    --cc=palmer@dabbelt.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=paul.walmsley@sifive.com \
    --cc=peterz@infradead.org \
    --cc=philmd@linaro.org \
    --cc=rdunlap@infradead.org \
    --cc=rientjes@google.com \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=souravpanda@google.com \
    --cc=svens@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tzimmermann@suse.de \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /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