Re: [RFC PATCH 2/3] mm/memory_hotplug: Create __shrink_pages and move it to offline_pages

From: Oscar Salvador
Date: Wed Aug 08 2018 - 04:00:55 EST


On Wed, Aug 08, 2018 at 09:51:50AM +0200, David Hildenbrand wrote:
> > I am pretty sure this is a dumb question, but why HMM/devm path
> > do not call online_pages/offline_pages?
>
> I think mainly because onlining/offlining (wild guesses)
>
> - calls memory notifiers
> - works with memory blocks
>
> (and does some more things not applicable to ZONE_DEVICE memory)

Yes, you are right.
They call arch_add_memory while want_memblock being false and so they do not
get to call hotplug_memory_register which handles all the memory block stuff.

Thanks
--
Oscar Salvador
SUSE L3