All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Ying" <ying.huang@linux.alibaba.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: David Hildenbrand <david@redhat.com>,
	linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org
Subject: Why prevent boot memory to be hot-removed on arm64?
Date: Tue, 29 Jul 2025 14:22:50 +0800	[thread overview]
Message-ID: <87cy9j1pol.fsf@DESKTOP-5N7EMDA> (raw)

Hi, Anshuman,

When I read memory hotplug code on arm64, I found that a memory notifier
(prevent_bootmem_remove_notifier()) is used to prevent the boot memory
to be hot-removed on arm64.  I understand that some memory (for example
the boot memory) shouldn't be hot-removed on some platforms.  However,
after checking the code, I found that the memory can only be hot-removed
via ACPI (acpi_memory_device_remove()), CXL/NVDIMM
(dev_dax_kmem_remove()), or virtio mem (virtio_mem_remove_memory).
IIUC, CXL/NVDIMM or virtio mem shouldn't be boot memory, and ACPI memory
hot-remove shouldn't be setup by the firmware if some memory ranges
shouldn't be hot-removed.  If so, the boot memory cannot be hot-removed
accidentally, prevent_bootmem_remove_notifier() just makes the boot
memory can not be offlined.

Or I missed something?

---
Best Regards,
Huang, Ying


                 reply	other threads:[~2025-07-29  6:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87cy9j1pol.fsf@DESKTOP-5N7EMDA \
    --to=ying.huang@linux.alibaba.com \
    --cc=anshuman.khandual@arm.com \
    --cc=david@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.