Re: [PATCH v5 1/5] mm,memory_hotplug: Allocate memmap from the added memory range
From: Michal Hocko <mhocko@suse.com>
Date: 2021-03-26 14:39:28
Also in:
lkml
From: Michal Hocko <mhocko@suse.com>
Date: 2021-03-26 14:39:28
Also in:
lkml
On Fri 26-03-21 09:52:58, David Hildenbrand wrote: [...]
Something else to note: We'll not call the memory notifier (e.g., MEM_ONLINE) for the vmemmap. The result is that 1. We won't allocate extended struct pages for the range. Don't think this is really problematic (pages are never allocated/freed, so I guess we don't care - like ZONE_DEVICE code).
Agreed. I do not think we need them. Future might disagree but let's handle it when we have a clear demand.
2. We won't allocate kasan shadow memory. We most probably have to do it explicitly via kasan_add_zero_shadow()/kasan_remove_zero_shadow(), see mm/memremap.c:pagemap_range()
I think this is similar to the above. Does kasan has to know about memory which will never be used for anything?
Further a locking rework might be necessary. We hold the device hotplug lock, but not the memory hotplug lock. E.g., for get_online_mems(). Might have to move that out online_pages.
Could you be more explicit why this locking is needed? What it would protect from for vmemmap pages? -- Michal Hocko SUSE Labs