Re: [PATCH v1 1/3] mm: pass meminit_context to __free_pages_core()

2024-06-09 Thread Oscar Salvador
On Fri, Jun 07, 2024 at 11:09:36AM +0200, David Hildenbrand wrote: > In preparation for further changes, let's teach __free_pages_core() > about the differences of memory hotplug handling. > > Move the memory hotplug specific handling from generic_online_page() to > __free_pages_core(), use adjust

Re: [PATCH v1 2/3] mm/memory_hotplug: initialize memmap of !ZONE_DEVICE with PageOffline() instead of PageReserved()

2024-06-09 Thread Oscar Salvador
On Fri, Jun 07, 2024 at 11:09:37AM +0200, David Hildenbrand wrote: > We currently initialize the memmap such that PG_reserved is set and the > refcount of the page is 1. In virtio-mem code, we have to manually clear > that PG_reserved flag to make memory offlining with partially hotplugged > memory

Re: [PATCH v1 3/3] mm/memory_hotplug: skip adjust_managed_page_count() for PageOffline() pages when offlining

2024-06-09 Thread Oscar Salvador
On Fri, Jun 07, 2024 at 11:09:38AM +0200, David Hildenbrand wrote: > We currently have a hack for virtio-mem in place to handle memory > offlining with PageOffline pages for which we already adjusted the > managed page count. > > Let's enlighten memory offlining code so we can get rid of that hack